Here's the code:
And here's the result:use strict; my %hDat; my $d; my $n; map( ($hDat{lc $_ . $n++} = $_), <DATA> ); foreach $d (sort keys %hDat) { print $hDat{$d}; } __DATA__ a B c D E Aa Xx A
a A Aa B c D E XxYou know, there is more than one way. :-)
In reply to Using a hash
by l3nz
in thread noncase-sensitive sorting
by texuser74
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |