in reply to Regular Expression help

This may seem a little funky, and it is somewhat dependant on what you want to allow as machine and user names. But this should give you something to work with.

my ( $date, $activity, $machine, $company ) = $_ =~ m/^(.+(?:AM|PM)) \|\d\| (.+) \sfor\s ([\w\d-]+@[\w\d.-]) \s.+\bby\s ([\w\d]) [^\w\d]+$ /x;

I used the /x modifier to allow whitespace within the RE, so that I could group it in segments that each accomplish a different portion of the match. You probably ought to also have a look at perlre and perlretut, as well as perlfaq6. They will go a long way toward giving you a good comfort level with RE's.


Dave


"If I had my life to live over again, I'd be a plumber." -- Albert Einstein