
danielpcorrea
Novice
Apr 6, 2009, 1:26 AM
Post #1 of 3
(1241 views)
|
|
[RESOLVED]how to take the previous line
|
Can't Post
|
|
Hi I'm working with a strange log. It's a mix between timestamp normal log and xml format. Ex: 20090231175400 | abc | good 20090231175500 | abc | bad 20090231175600 | abc | good <pb><pms="0123456"></pms></pb> I need the last timastamp value before the xml row (20090231175600) My script take the xml line, but I dont know how to take the previous line.
if ($_ =~ m/pms/) { chomp; $RScont++; } Can anybody help me? thanks Daniel
(This post was edited by danielpcorrea on Apr 7, 2009, 1:42 AM)
|