Skip to content

Instantly share code, notes, and snippets.

@smujohnson
Created August 21, 2012 20:44
Show Gist options
  • Save smujohnson/3419284 to your computer and use it in GitHub Desktop.
Save smujohnson/3419284 to your computer and use it in GitHub Desktop.
#!/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