use strict; my %hDat; my $d; map( ($hDat{lc $_} = $_), ); foreach $d (sort keys %hDat) { print $hDat{$d}; } __DATA__ a Bongo c BoNgo dd c A zzzz q r