Connect with Expertise | Find Experts, Get Answers, Share Insights

break in perl

 
Join Date: May 2008
Posts: 51
#1: May 28 '08
hi,
How to come forcefully come out of a loop,but not from the program,
like we use break statement in c. Is there any predefined function like break in perl?

cheers,
pavan

nithinpes's Avatar
E
C
 
Join Date: Dec 2007
Posts: 407
#2: May 28 '08

re: break in perl


Hi pavan,

'last' works like break in C. To give you a brief overview of control statements:
last - come out of the statement block
next - terminate current iteration and continue with next iteration(used in loops)
continue - continue with the next block
exit - exit the program/script


-Nithin
Banned
 
Join Date: Jul 2008
Posts: 8
#3: Jul 8 '08

re: break in perl


If you want it quickly:
DELETED
Reply

Tags
break perl, breakin perl, perl break