Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Using grep and glob to find directories containing fileby 7stud (Deacon) |
on Feb 03, 2013 at 23:28 UTC ( [id://1016874]=note: print w/replies, xml ) | Need Help?? |
Also what happens when glob is called in a function that is embedded in a loop? Let's find out:
perl says the context of the glob iterator is still a loop. And it doesn't matter how deep the subs are nested:
the behavior for example of glob used somewhere deep in a module funciton would vary depending on whether it was at some level called from something in a loop I can't figure out an example of that. Edit -- okay, here is an example that shows how a function that relies on the behavior of glob inside the function can produce faulty results when the function is called in a loop:
In Section
Seekers of Perl Wisdom
|
|