in reply to sorting files
I'm surprised that I seem to be the first one to suggest a Schwartzian Transform:
(Not fully tested, but updated to add a missing "_" in the replacement string of the s///e operation)@TXT = map { s/\d+ //; $_ } sort map { s/(.*?)_(\d+)_/sprintf("%04d %s_%s_",$2,$1,$2)/e; $_ } gl +ob( "*.txt" );
In Section
Seekers of Perl Wisdom