in reply to Re^2: Need help in extracting timestamp from the line in a file
in thread Need help in extracting timestamp from the line in a file
if (/\-+ [A-Za-z]{3} (.*?) (.*?) (.*?)\:(.*?)\:(.*?) (\d+)::(\d+)::Lau +nching the JVM with following options/) { ...
Also, use hashes and sprintf to format the numbers and convert month names:
# Declaration my $m = 1; my %MONTH = map { $_ => $m++ } qw( Jan Feb Mar Apr May ... ); # Later in the code: $month = sprintf '%02d', $MONTH{$1};
|
---|