Created
August 21, 2012 20:44
-
-
Save smujohnson/3419284 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use 5.010; | |
use Data::Dumper; | |
# --- | |
my @list = ( | |
{ track => 5, title => "I love me a good pig!" }, | |
{ track => 4, title => "Great tunes.com" }, | |
{ track => 2, title => "Doggy doggy doggy, come to town doggy!" }, | |
{ track => 7, title => "Rock and/or roll" }, | |
); | |
@list = sort { $a->{track} <=> $b->{track} } @list; | |
say Dumper @list; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment