Hi,
I am coding a script to read a pure txt fiel and show it. I can't understand
why any lines in the file match the word of "[DIED]".
Thanks
Org
------------------------------------------------the txt file is like this:
Fri Feb 13 14:31:26 2009[PROCESS]: Welcome to our system![ERROR]: Please check
step 1![SUCCESS]: all done! enjoy the data!
---------------------------------------My code is: ...
while(my $line = <>){ chomp( $line );
print "<p>current line is $line";
if($line =~ /^[Mon|Tue|Wed|Thu|Wed|Fri|Sat|Sun]/){
#push old data into array print "<p>time:
$line"; } elsif($line = ~ /\[DIED\]/){
print "<p>DIED: $line "; }
elsif($line =~ /\[SUCCESS\]/){ print "<p>
success:$line"; } elsif($line =~ /\[PROCESS\]/){
print "<p>process: $line"; } }
-------------------------------------------the result is:
Current line is Fri Feb 13 14:31:26 2009time: Fri Feb 13 14:31:26 2009current
line is [PROCESS]: Welcome to our system!DIED: 18446744073709551615 current
line is [ERROR]: Please check step 1!DIED: 18446744073709551615 current line is
[SUCCESS]: all done! enjoy the data!DIED: 18446744073709551615
-----------------------------------------------------
_________________________________________________________________
Get the most out of your life online! Click here for the latest news and tips.
http://livelife.ninemsn.com.au/