good chemistry is complicated, and a little bit messy -LW |
|
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?? |
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.
In Section
Seekers of Perl Wisdom
|
|