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


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.