@temp = map {$_->[1]} sort {$a->[0] cmp $b->[0]} map {($da = lc $_) =~ s/[\W_]+//g;[$da,$_]} @temp; #### @temp = map {(unpack ("A100A100",$_))[1]} sort map {($da = lc $_) =~ s/[\W_]+//g;pack("A100A100",$da,$_)} @temp;