You can sort the filenames using sort(), and you can write your own comparison subroutine. See perlfunc:sort for details.
You can use substr() to get the number at the end. See perlfunc:substr for details.
You can use '<=>' to compare the numbers. See perlman:perlop for details.
stephen
In reply to Re: Sorting on Files
by stephen
in thread Sorting on Files
by Perl Newby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |