How about just defaulting to stripping s{[.]([^./\\]*)$}{} (slightly more portably) instead of having to pass in a huge (and likely incomplete) list of possible extensions. That interface never made much sense to me, and hence I don't use it (and I'm not surprised that it is slow). I'd say, if it hurts, stop doing it (use something other than File::BaseName for stripping extensions, such as that regex I show above, which is portable enough for most work, likely). (:
- tye
In reply to Re^2: File::Basename is dog slow
by tye
in thread File::Basename is dog slow
by petdance
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |