Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: foreach vs. while inside a directory tranversing subroutine

by wrog (Friar)
on May 26, 2015 at 03:48 UTC ( [id://1127757]=note: print w/replies, xml ) Need Help??


in reply to foreach vs. while inside a directory tranversing subroutine

it might be instructive to bracket the traverse_file in the first version with print statements and see what you get, e.g., replace the inner
traverse_file($_);
with
print STDERR "> $_\n"; exit 0 if ++$count > 100; traverse_file($_); print STDERR "<\n";
with a suitable our $count=0 at top level somewhere.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-18 23:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found