Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 about the Monastery: (7)
As of 2014-09-21 20:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (175 votes), past polls