Created
September 5, 2016 10:10
-
-
Save angch/52810c746a21cb726ba32ce5df072988 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
use v6; | |
my $employees = [ | |
{firstname=>'Joe', lastname=>'Bloggs', grade=>3}, | |
{firstname=>'Ola', lastname=>'Nordmann', grade=>3}, | |
{firstname=>'Kari', lastname=>'Nordmann', grade=>2}, | |
{firstname=>'Jane', lastname=>'Doe', grade=>4}, | |
{firstname=>'John', lastname=>'Doe', grade=>3}, | |
]; | |
say ( | |
$employees.sort: {-$^a{'grade'}, $^a{'lastname'}, $^a{'firstname'}} | |
).perl; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment