Only if you assume he wasn't dealing with a path in the first place.
I assumed the OP was dealing with paths. If he's not, I believe he's better off not using File::Basename at all rather than your workaround.
In reply to Re^3: Quick Regex Needed
by ikegami
in thread Quick Regex Needed
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |