Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: File::Find problem

by clairudjinn (Beadle)
on Mar 17, 2003 at 17:44 UTC ( [id://243706]=note: print w/replies, xml ) Need Help??


in reply to File::Find problem

Replies are listed 'Best First'.
Re: Re: File::Find problem
by converter (Priest) on Mar 17, 2003 at 18:29 UTC

    preprocess(): you pass in a list of files, set a flag, and then pass the same list back...seems to me that all you need to do is set the flag...

    preprocess() is intended to be used as a filter for the list of files returned by readdir(), so it is expected to return a list, which in turn replaces the original list returned by readdir().

    Eliminating the unnecessary assignment, preprocess() could be reduced to:

    sub preprocess { print "Pre-Processing\n"; $old_flag = 0; @_; }

    This would probably be a little more efficient, but I'd be inclined to look for an even more efficient solution that would eliminate the need to pass the entire file list around just to set a flag.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-03-28 22:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found