Loading ...
Sorry, an error occurred while loading the content.

Re: [NH] newbie Perl scripting

Expand Messages
  • Ron Woodall
    Hi Alec: Thanks for the tip. I ve tried the print instruction but nothing happens. I guess I ll have to go back to the drawing board and try to figure this out
    Message 1 of 5 , Oct 16, 2001
    • 0 Attachment
      Hi Alec:

      Thanks for the tip. I've tried the print instruction but nothing
      happens. I guess I'll have to go back to the drawing board and try to
      figure this out again.

      Thanks again.

      Ron


      At 11:47 PM 10/15/01 -0400, you wrote:
      >Ron - take a look at clipbook library SampleCode and use the script for
      >Perl - number lines as a model ... Alec
      >----- Original Message -----
      >From: "Ron Woodall" <nor@...>
      >To: <ntb-html@yahoogroups.com>
      >Sent: 15 October, 2001 13:18
      >Subject: [NH] newbie Perl scripting
      >
      >
      > > Hi:
      > >
      > > I'm trying to figure out how to run a script on a NoteTab document. So far
      > > I've figured out that the content of the document goes to <STDIN> but I've
      > > not been able to figure out how to write it back to the document. I've
      > > tried <STDOUT> to no avail. Any suggestions?
      > >
      > > Thanks
      > >
      > > Ron Woodall
      >
      >
      >
      >
      >
      >
      >
      >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >

      ---------------------------------------
      Ron Woodall
      nor@...

      The Compendium of HTML Elements
      "your essential web publishing resource"

      - available at/disponible à:
      http://au.htmlcompendium.org/index.htm (Australia)
      http://www.htmlcompendium.org/index.htm (Europe and North America)
    • Piotr Bienkowski
      ... Hi Ron, Here s an example with the print command (and a few others). If the e- mail program collapsed the lines together, then each line should end right
      Message 2 of 5 , Oct 16, 2001
      • 0 Attachment
        On 16 Oct 2001, at 10:47, Ron Woodall wrote:

        > Hi Alec:
        >
        > Thanks for the tip. I've tried the print instruction but
        > nothing
        > happens. I guess I'll have to go back to the drawing board and try to
        > figure this out again.
        >

        Hi Ron,

        Here's an example with the print command (and a few others). If the e-
        mail program collapsed the lines together, then each line should end
        right after the ; character. The following script splits each line on
        the tab character, and then prints out field 4 and 6 (the first field
        being field zero) of each line.

        while (<>) {
        chomp($_);
        @a = split('\t',$_);
        print "$a[4]\t$a[6]\n";
        }

        HTH

        Piotr
      • Ron Woodall
        Hi Piotr: Hey - it works! Dam - ain t technology great? But then, without technology I wouldn t have had the problem in the first place ;-) Thanks for the help
        Message 3 of 5 , Oct 17, 2001
        • 0 Attachment
          Hi Piotr:

          Hey - it works! Dam - ain't technology great? But then, without
          technology I wouldn't have had the problem in the first place ;-)

          Thanks for the help and the info.

          Ron Woodall


          At 07:33 AM 10/17/01 +0200, you wrote:
          >On 16 Oct 2001, at 10:47, Ron Woodall wrote:
          >
          > > Hi Alec:
          > >
          > > Thanks for the tip. I've tried the print instruction but
          > > nothing
          > > happens. I guess I'll have to go back to the drawing board and try to
          > > figure this out again.
          > >
          >
          >Hi Ron,
          >
          >Here's an example with the print command (and a few others). If the e-
          >mail program collapsed the lines together, then each line should end
          >right after the ; character. The following script splits each line on
          >the tab character, and then prints out field 4 and 6 (the first field
          >being field zero) of each line.
          >
          >while (<>) {
          >chomp($_);
          >@a = split('\t',$_);
          >print "$a[4]\t$a[6]\n";
          >}
          >
          >HTH
          >
          >Piotr
          >
          >
          >
          >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          >

          ---------------------------------------
          Ron Woodall
          nor@...

          The Compendium of HTML Elements
          "your essential web publishing resource"

          - available at/disponible à:
          http://au.htmlcompendium.org/index.htm (Australia)
          http://www.htmlcompendium.org/index.htm (Europe and North America)
        • Piotr Bienkowski
          ... Glad it worked for you. Perl is a very hairy language, but is well worth making friends with... Regards, Piotr
          Message 4 of 5 , Oct 17, 2001
          • 0 Attachment
            On 17 Oct 2001, at 11:45, Ron Woodall wrote:

            > Hi Piotr:
            >
            > Hey - it works! Dam - ain't technology great? But then,
            > without
            > technology I wouldn't have had the problem in the first place ;-)
            >
            > Thanks for the help and the info.

            Glad it worked for you. Perl is a very "hairy" language, but is well
            worth making friends with...


            Regards,

            Piotr
          Your message has been successfully submitted and would be delivered to recipients shortly.