http://www.perlmonks.org?node_id=743753


in reply to Re^2: changing date format in and out
in thread changing date format in and out

The example that was given to you is the guts of what you are asking for.

Take the code that was given to you by mr_mischief, and save it in a file (lets call it foo.pl). Then just pass your input file through that, ie:

perl foo.pl < infile > outfile
Although, you will probably want to change the line:
print (gmtime $_);
to read:
print scalar gmtime($_);
Or alternatively, if you want your output in local time, then:
print scalar localtime($_);
Hope this helps,
Darren