in reply to Searching for files efficiently help!
Definitely what jethro says.
A minor note - your $files regex stores two values but you only use one. And if you change the delimiter, you don't have to escape the slash. So, instead of:
if($files=~/(.*?)\/([^\/]+)$/) { $f_name = $2; }
Either:
# match all non-slashes up to end of line if($files=~m|([^/]+)$|) { $f_name = $1; }
Or:
# match everything beyond last slash if($files=~m|.*/(.+)|) { $f_name = $1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Searching for files efficiently help!
by Anonymous Monk on Nov 16, 2011 at 19:02 UTC | |
by hbm (Hermit) on Nov 16, 2011 at 19:45 UTC | |
by Anonymous Monk on Nov 16, 2011 at 20:17 UTC | |
by Anonymous Monk on Nov 16, 2011 at 19:24 UTC |