Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^5: File::Find finding . and ..

by moritz (Cardinal)
on Jul 15, 2009 at 16:09 UTC ( [id://780384]=note: print w/replies, xml ) Need Help??


in reply to Re^4: File::Find finding . and ..
in thread File::Find finding . and ..

I wrote return if... and not next if ... for a reason.

Since you are in a subroutine and not directly in a loop, next will jump to the next iteration of your caller's loop, and warns about Exiting subroutine via next at ... - don't you get such warnings? Since you don't know how File::Find works internally, that might cause very nasty behaviour.

By the way I don't find that excessive use of newlines improves readability - on the contrary, you have to scroll more to see a relevant part of the code.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2025-04-30 20:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.