Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: File:Find DIR search sub routine query

by zentara (Archbishop)
on May 27, 2014 at 11:29 UTC ( [id://1087515]=note: print w/replies, xml ) Need Help??


in reply to File:Find DIR search sub routine query

I havn't tested this with your particular code, but I remember having a similar problem, and it was solved like this, by adding some explicit returns:
# instead of your if, split it up into 2 lines # return unless -d; # $File::Find::prune = 1 if /[LP]\d{8}$/; # Don't recurse. # print "$File::Find::dir/$_/\n" if /[LP]\d{8}$/; return unless -d; return unless $_ =~ /[LP]\d{8}$/; $File::Find::prune = 1; # don't descend print "$File::Find::dir\n"; print "$file::Find::name\n"; # or possibly better return $File::Find::prune = 1 if /[LP]\d{8}$/; # Don't recurse.

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Replies are listed 'Best First'.
Re^2: File:Find DIR search sub routine query
by PerlPlay (Novice) on May 29, 2014 at 07:39 UTC

    Thanks for responding, I tried what you said but it still didn't work for me. I'll continue to fiddle and see if I can find a working solution.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2024-04-26 01:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found