in reply to Sorting Files with Numbers
Try this. (untested)
This compares everything except the first 4 characters using the numeric comparision operator. <=>.foreach my $file (sort {substr($a,4) <=> substr($b,4)} keys %hash) { print "$key \n"; }
Examine what is said, not who speaks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Sorting Files with Numbers
by hardburn (Abbot) on Dec 30, 2002 at 17:07 UTC | |
by dmmiller2k (Chaplain) on Dec 31, 2002 at 15:08 UTC |