in reply to Convert Old Unix Date to Perl and compare
I use unpack ...
my $file = 'Rajesh.1202242219'; my ($name, $datetime) = split /\./, $file; my ( $y, $m, $d, $hr, $min ) = unpack 'A2A2A2A2A2', $datetime; print "( $y, $m, $d, $hr, $min )"; # returns .. ( 12, 02, 24, 22, 19 )
As Occam said: Entia non sunt multiplicanda praeter necessitatem.
In Section
Seekers of Perl Wisdom