Kashif Salman wrote:
Greetings,

Hello,

I have a log file like so, and I am trying to get the date on the next line
after "Start..." line. So for the log below I'd like to get the output

04/06/05
05/06/05
06/06/05

But I also need to re-format that so the end result becomes:

2005-04-06
2005-05-06
2005-06-06

Any hints?

while ( <> ) {
    /^Start/ && <> =~ /^(\d+)\/(\d+)\/(\d+)/ && print "20$3-$1-$2";
    }


John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to