in reply to Sorting Files with Numbers

The key is to extract the numeric part of each filename, and compare numerically those values.
Something like this will do the job:
foreach my $file ( sort { my($as,$an) = $a =~ /^(\D*)(\d+)/; my($bs,$bn) = $b =~ /^(\D*)(\d+)/; $as cmp $bs or $an <=> $bn } keys %hash )
However, that is not optimal for the sort.
You can resort (heh) to a Schwartzian Transform to improve efficiency:
foreach my $file ( map { $_->[0] } sort { $a->[1] cmp $b->[1] or $a->[2] <=> $b->[2] } map { [ $_, /^(\D*)(\d+)/ ] } keys %hash )

jdporter
The 6th Rule of Perl Club is -- There is no Rule #6.