On Mar 31, Ofir said:

>Line 1: URL
>Line 2: Time and Date
>Line 3: News Item
>Line 4: Item Source
>Line 5: URL
>Line 6: Time and Date
>Line 7: News Item
>Line 8: Item Source

>How do I parse it, since this is not a "regular" record-per-line file, but
>rather a four-line each record?

Simply read in four lines at a time.

  until (eof FILE) {
    my @lines = map scalar <FILE>, 1 .. 4;
    # work with $lines[0], $lines[1], $lines[2], and $lines[3]
  }

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to