Help for this page
use warnings; use strict; ... map {[$_,(split':')[0]]} @lines; print "$_\n" for @sorted;