mysfitt has asked for the wisdom of the Perl Monks concerning the following question:
Please let me know where I have gone awry. alas the output has been inconsistent.open(MSG_FILE, "$syslog_dir/$_/messages"); @msg_content = <MSG_FILE>; close MSG_FILE; # Read time of last entry in a file [think tail -n1] # and compare to current $msg_content[-1] =~ /((\d{1,2})\:(\d{2})\:(\d{2})){1}/ +; @timestamp = split(/:/, $1);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: grabbing time from a syslog logfile
by socketdave (Curate) on Sep 12, 2005 at 20:18 UTC | |
Re: grabbing time from a syslog logfile
by philcrow (Priest) on Sep 12, 2005 at 20:10 UTC | |
Re: grabbing time from a syslog logfile
by Hue-Bond (Priest) on Sep 12, 2005 at 22:03 UTC |