in reply to Re^7: Help with $File:Find
in thread Help with $File:Find

Hi,

If you don't want to recurse , use maxdepth 1, not preprocess

findrule is just about the easiest way to use File::Find

$ findrule test test test/foo.txt test/test test/test/foooooo.txt $ findrule test -file test/foo.txt test/test/foooooo.txt $ findrule test -file -name "foo*txt" test/foo.txt test/test/foooooo.txt $ findrule test -file -name "foo*txt" -maxdepth 0 $ findrule test -file -name "foo*txt" -maxdepth 1 test/foo.txt $ findrule test -file -name "foo*txt" -maxdepth 2 test/foo.txt test/test/foooooo.txt

setup/teardown

perl -MPath::Tiny -le " path(q{test/test/foooooo.txt})->touchpath " perl -MPath::Tiny -le " path(q{test/foo.txt})->touchpath " perl -MPath::Tiny -le " path(q{test})->remove_tree "