in reply to file::find question
I'm not sure what you trying to match, you say the user can enter either the literal string "/" or the regular expression /\/w+/ but then test for neither.
m|\x2f{1}?| is just an obscure way of sayingm|/| which is not the same thing as $fs eq "/". The g modifier seems unnecessary. The next test checks for input that doesn't match /\/w+/.
I will guess that you don't want to prune if the directory path has a '/' and do otherwise.
find_me( $fs, $fs =~ m|/| ); sub find_me { my @directory = shift; # play nicely with others local $File::Find::prune = shift; <snip> }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: file::find question
by mikejones (Scribe) on Jan 05, 2008 at 04:02 UTC | |
by hipowls (Curate) on Jan 05, 2008 at 05:45 UTC | |
by mikejones (Scribe) on Jan 05, 2008 at 15:23 UTC | |
by mikejones (Scribe) on Jan 08, 2008 at 03:11 UTC | |
by plobsing (Friar) on Jan 05, 2008 at 05:00 UTC |