|
|
| Welcome to the Monastery | |
| PerlMonks |
Re^3: foreach my $question (@perlmonks){}by muba (Curate) |
| on Jun 19, 2012 at 10:27 UTC ( #977015=note: print w/ replies, xml ) | Need Help?? |
|
But that's not what the code says... Walk through it with me.
Okay. And then:
You see it? Look at that line again. See it now? Look again until you do. For each element of @trips, an array of which we just established that it has exactly one element, anyway, so for each element of that set of one element,, you want to do something. And you get a result like it runs the loop only exactly one time. Hmm, boggles the mind, don't it :) If, at this point, you still really need another clue? Try finding those nodes that you want to loop over, and loop over them, instead of trying to loop over something that you know only occurs once.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||