print for map { pop @$_ } sort { $a->[0] <=> $b->[0] } map { [ (split /,/)[3], $_ ] } <>; #### -F, Autosplit delimiter is ',' -a Enable autosplit fields into @F -n Assume while (<>) { ... } around program -E Eval one-line program with optional features (i.e., 'say', in this case)