Hi
Been stuck on this small problem for a while now and wondered if anyone can help. I have a hash where the keys all begin with E followed by a number, e.g. E47. I need to sort through this hash so that it goes E1, E2... E59 and so on, while it iterates through the foreach loop. The best I can think of is this, but it only compares the second char.
foreach my $key (sort { $a cmp $b } keys %full){ }
I imagine there's a simple solution, any help would be greatly recieved.
Thanks
In reply to sort after first char of hash key by danj35
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |