Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: How to use 'last' / 'next' commands to exit loop?

by borisz (Canon)
on May 30, 2006 at 17:27 UTC ( [id://552561]=note: print w/replies, xml ) Need Help??


in reply to How to use 'last' / 'next' commands to exit loop?

last exit the current loop ( in your case the while loop ). if you like to exit all loops and continue at with the next entry on the for loop lable that.
... loop: foreach ( @arr_vars ){ while( (my $key, my $value) = each %mapped_vars){ ... if ( $_ eq $key ) { ... next loop; } }
Boris

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (1)
As of 2024-04-25 01:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found