in reply to Sorting Files with Numbers
foreach my $file (sort {$a <=> $b} keys %hash) { print "$key \n"; }
Ex.
Wonko.perl -e 'print qq{[$_]\n} for ( sort { $a <=> $b } qw(file1 file10z fi +le11s file2q file20z file21f) )'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Sorting Files with Numbers
by John M. Dlugosz (Monsignor) on Dec 30, 2002 at 17:07 UTC | |
by Wonko the sane (Curate) on Dec 30, 2002 at 17:19 UTC | |
by John M. Dlugosz (Monsignor) on Dec 30, 2002 at 17:22 UTC |