Hello Perl Gurus,

 

Is there some way to set the special variable $/ to a regular expression
such as (.+?):(\d+):(.*)

I have tried:

 

local $/ =~ m/(.+?):(\d+):(.*)/; # But cannot change $/;

local $/= /(.+?):(\d+):(.*)/; # Use of uninitialized  value in pattern
match m//.

 

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

 

Your advice will be much appreciated!

Denham

Reply via email to