Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^4: Sorting an Array

by choroba (Cardinal)
on Jul 31, 2014 at 17:22 UTC ( [id://1095779]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Sorting an Array
in thread Sorting an Array

Or, you can use Time::Piece (core since 5.10) and Orcish Maneuver:
my %cache; @sorted = sort { ( $cache{$a} //= 'Time::Piece'->strptime($a->{statement_date}, '%m +/%d/%Y') ) <=> ( $cache{$b} //= 'Time::Piece'->strptime($b->{statement_date}, '%m +/%d/%Y') ) } @statements;
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2024-04-23 21:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found