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

Re: [PBML] Re: A File PArse Beginner Qeustion

Expand Messages
  • Ofir
    Thanks, you re right, but maybe one specific question I have is: How can I track in which line I m, since the records are four lines each, and I need to know
    Message 1 of 1 , Mar 29, 2002
    • 0 Attachment
      Thanks, you're right, but maybe one specific question I have is:

      How can I track in which line I'm, since the records are four lines each,
      and I need to know somehow when the next record begin. I think I know how to
      skip blank lines, so I'll leave it out for now...
      Since it's a really beginner NG I had the nerve to ask this question, so ...
      please, can anyone help?

      TIA!
      Ofir

      ----- Original Message -----
      From: "daymobrew" <daymobrew@...>
      To: <perl-beginner@yahoogroups.com>
      Sent: Friday, March 29, 2002 4:10 PM
      Subject: [PBML] Re: A File PArse Beginner Qeustion


      > --- In perl-beginner@y..., Ofir <ofirb1@n...> wrote:
      > > Hi all,
      > >
      > > I have a file I need to read with the following structure:
      > >
      > > Line 1: URL (still need to split values in it)
      > > Line 2: Time and Date (still need to split values in it)
      > > Line 3: News Item (still need to split values in it)
      > > Line 4: Item Source (still need to split values in it)
      > > Line 5: Empty Line(!)
      > > Line 6: URL (still need to split values in it)
      > > Line 7: Time and Date (still need to split values in it)
      > > Line 8: News Item (still need to split values in it)
      > > Line 9: Item Source (still need to split values in it)
      > > Line 10: Empty Line(!)
      > > ...
      > > ...
      > >
      > > How can I parse the file, read the first four lines, split data on
      > each
      > > line, move next to the next four line , skipping the blank lines,
      > and come
      > > up with the news?
      > >
      > > Thanks in advance!
      > > Ofir
      >
      > I recommend you try to do this and then post your code with specific
      > questions.
      > You'll need functions like: open, close, split and the <FH> operator.
      >
      >
      >
      >
      > Unsubscribing info is here:
      http://help.yahoo.com/help/us/groups/groups-32.html
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.