Help for this page
my $previous = ""; for my $item (@list) { ... $previous = $item; $previous =~ s/^(.+)\: .+/$1/; # the regex by which you want to grou +p your items }