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;
In reply to Re^4: Sorting an Array
by choroba
in thread Sorting an Array
by burgerc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |