Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: next in continue doesn't DWIM

by hdb (Monsignor)
on Nov 14, 2013 at 12:04 UTC ( [id://1062559]=note: print w/replies, xml ) Need Help??


in reply to next in continue doesn't DWIM

Even if next did what you wanted, you would run into an infinite loop if both foo($try) and $try % 10 would be true.

Update: What I said above is not correct, see Eily's comment below.

Replies are listed 'Best First'.
Re^2: next in continue doesn't DWIM
by Eily (Monsignor) on Nov 14, 2013 at 12:15 UTC

    last's documentation states:

    The continue block, if any, is not executed:
    So a last statement always exits a loop if executed.

      You are correct, my statement is wrong, I confused myself.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-04-23 15:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found