in reply to Regular Expressions, IF, Issue
In addition to this, the regex's beginning is needlessly ungreedy. /(.*)\/([^\/]+)$/ works the same way as yours, but is much faster. And consider using a different delimiter for your regex; m{(.*)/([^/]+)$} is much easier on the eyes!
I second the notion that you probably want to use File::Basename.
|
|---|