@temp = map { s/^The // } @indata; @sorted = sort {lc($a) cmp lc($b) } @temp; #### %hash = map { getkey($_) => $_ } @array; is just a funny way to write %hash = (); foreach $_ (@array) { $hash{getkey($_)} = $_; } #### @temp = map {my $tmp; ($tmp = $_) =~ s/^The //; $tmp} @indata