{use B} $a= -- $ |and map {s|$_| sub { map{ m{^ $_[0] (.{$a})}ix && return lc $1 } keys%B:: }->(lc $_ )|e && map { print $_ , $ " } split // and $ | and $a += $| --} split $ " ,".b .in ...._s u ..me v ". "..ty ..pea cc c" ."he v"