The stupid question is the question not asked | |
PerlMonks |
Re^4: Find the last item in a series of filesby Marshall (Canon) |
on Jun 22, 2017 at 22:13 UTC ( [id://1193326]=note: print w/replies, xml ) | Need Help?? |
Yes, File::Basename is a fine idea. But that won't get you out of providing a regex in this particular situation. The functions either take a list of strings like ".txt". ".doc". Or a regex in qr// form. Of course the enumerated suffix strings are the easiest way to use these functions. However, in this particular situation with varying numeric suffixes, ".001", etc., I would think a regex is needed even if using File::Basename.
In Section
Seekers of Perl Wisdom
|
|