Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^8: Help with $File:Find ( rule )

by beech (Parson)
on Feb 21, 2018 at 05:13 UTC ( [id://1209623]=note: print w/replies, xml ) Need Help??


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 "

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1209623]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-23 10:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found