Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Next from inner loop only works "most of the time"

by jo37 (Deacon)
on May 18, 2021 at 21:03 UTC ( [id://11132717]=note: print w/replies, xml ) Need Help??


in reply to Next from inner loop only works "most of the time"

Still puzzled.
We seem to agree that the given code is bad style, but should work. If it doesn't, the problem might be hidden in another piece of code you thought to be irrelevant. From your "run" output it is not clear to me, if there is some kind of user interaction involved in your loops. This could change the game because

while (<$fh>) { ... }

would modify a non-localized $_.

Just a wild guess, but I ran into this trap some time ago...

Greetings,
-jo

$gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2024-04-25 00:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found