Perl-Sensitive Sunglasses | |
PerlMonks |
Re^2: Find the last item in a series of filesby Marshall (Canon) |
on Jun 16, 2017 at 23:54 UTC ( [id://1192994]=note: print w/replies, xml ) | Need Help?? |
A simple split to two parts may not be enough depending upon the OP's filenames and how many '.' characters might be contained within those names. I think that
a regex assignment would be more appropriate instead of a split. But it could be that this is all the OP needs. I don't like your one line if..else because it is "hard to understand" and confers no execution advantage. Anyway, a nice algorithm idea that compares favorably with the HoA ideas previously posted.
In Section
Seekers of Perl Wisdom
|
|