Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 imbibing at the Monastery: (15)
As of 2015-07-02 09:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (33 votes), past polls