http://qs321.pair.com?node_id=729496


in reply to Re: Regex To Remove File Extension
in thread Regex To Remove File Extension

File::Basename says

$basename = basename($fullname,@suffixlist);

If @suffixes are given each element is a pattern (either a string or a qr//) matched against the end of the $filename. The matching portion is removed and becomes the $suffix.

So File::Basename doesn't solve the original problem, it requires the solution before it can be used.