Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Sorting The Date format Values without using any perl modules.

by fishbot_v2 (Chaplain)
on Dec 26, 2005 at 22:52 UTC ( #519221=note: print w/ replies, xml ) Need Help??


in reply to Sorting The Date format Values without using any perl modules.

use strict; use warnings; my @list = ( '2005-12-01' , '2005-11-02' , '2005-12-07'); my @sorted = map { $_->[3] } sort { $a->[0] <=> $b->[0] || $a->[1] <=> $b->[1] || $a->[2] <=> $b->[2] } map { [ unpack( 'A4 x[A] A2 x[A] A2', $_ ), $_ ] } @list;

Your restrictions are beyond baffling.

  • Comment on Re: Sorting The Date format Values without using any perl modules.
  • Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2016-07-23 11:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (220 votes). Check out past polls.