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

Re: [PBML] Setting special variable $/ to a regular expression

Expand Messages
  • Dave Gray
    ... So it sounds like you re trying to get each log entry... how about using your regex that matches the date and splitting on that? my @log_entries =
    Message 1 of 2 , Aug 28, 2004
    • 0 Attachment
      > I am trying to process a logfile, with a time based entry as an entry
      > identifier i.e.
      >
      > Wed Mar 31 11:40:45 2004
      >
      > Thread 1 advanced to log sequence 4636
      >
      > Wed Mar 31 11:40:45 2004
      >
      > Current log# 1 seq# 4636 mem# 0: x:\xxxxxx\xxxxx\xxx\xxxxxxx.LOG
      >
      > Wed Mar 31 11:40:46 2004
      >
      > ARC0: media recovery enabled

      So it sounds like you're trying to get each log entry... how about
      using your regex that matches the date and splitting on that?

      my @log_entries = split(/<date regex>/, $logfile);

      Cheers,
      Dave
    Your message has been successfully submitted and would be delivered to recipients shortly.