Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub sort_items {
- my $items = shift;
- my @items_sorted = sort {
- ( $a->{'id'} || 9999999999999 ) <=> ( $b->{'id'} || 9999999999999 )
- ||
- ( psql_date_to_DateTime( $a->{'dateend'} ) <=> psql_date_to_DateTime( $b->{'dateend'} ) )
- } @$items;
- \@items_sorted;
- }
- # later ...
- sub foo {
- my $items = shift; # array ref
- $items = sort_items( $items );
- }
Add Comment
Please, Sign In to add comment