[Sderby] perl question

Gareth gareth at bim7.com
Fri Jan 16 22:18:09 GMT 2004


Andrew White said:
>> Hi Guys
>>
>> I've got a log file from MMDF, and I need to convert the time and date
>> part of each entry to something readable!
>
> assuming input file is 'a' and output 'b', then:
>
> open(A,"a");
> open(B,">b");
> while(<A>) {
>         /([\d\.]+)(\s+.*)/;
> 	print B scalar(localtime($1)) . $2;
> }
>
> close(a); close(B);

WOW :-) that's eaxctly what I needed... much less code than I thought
would be needed.

Thanks a lot


Gareth



More information about the Sderby mailing list