in reply to sorting not sort
To do the latter, you need to provide a lot more code to sort. Here's one way:
sub sortable_key { my $key = shift; # e.g. "E1,E10"; $key =~ s/(\d+)/ chr($1+0x1000000) /e; return $key; } print map { "$_ = $strings{$_}\n" } sort { sortable_key($a) cmp sortable_key($b) } keys %strings;
|
|---|