Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Convert Old Unix Date to Perl and compare

by TomDLux (Vicar)
on Feb 27, 2012 at 19:39 UTC ( #956504=note: print w/ replies, xml ) Need Help??


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.


Comment on Re: Convert Old Unix Date to Perl and compare
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://956504]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (15)
As of 2014-08-28 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (264 votes), past polls