473,402 Members | 2,064 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

break in perl

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
May 28 '08 #1
2 25037
nithinpes
410 Expert 256MB
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
May 28 '08 #2
If you want it quickly:
DELETED
Jul 8 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jeremy Morton | last post by:
Probably been mentioned before but I fail to see why Perl changed the 'break' keyword to 'last', in loops. Bear with me on this - it seems semantically more accurate to say 'break' - you're...
5
by: Jim Isaacson | last post by:
Hi I'm looking for some help or a sample of a socket call to talk to a telnet server and send a telnet break from a C program. I've looked at the Stevens book and tried examples of his daytime...
25
by: chunhui_true | last post by:
In <<expert c>>I know the break in if wich is scoped in switch is break the switch,like: switch c case 1: if(b){ break; } ...... But like this: while(a){
0
by: Kirt Loki Dankmyer | last post by:
So, I download the latest "stable" tar for perl (5.8.7) and try to compile it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of different switches, but I can't get it to compile....
1
by: werwer | last post by:
How do C++ programmers build sentinel, what I'd call an "error frame" (in this case), stuctures? It's a great way to parse, error process, and avoid 'if' depth. Since C++ doesn't have a...
13
by: dm1608 | last post by:
I know all the hype right now from Microsoft is how much easier, faster, and less code ASP.NET 2.0 provides over previous versions. I'm puzzled by this as I could turn out an classic ASP webpage...
26
by: Alexander Korsunsky | last post by:
Hi! I have some code that looks similar to this: -------------------------------------------- char array = "abcdefghij"; for (int i = 0; i < 10; i++) {
15
by: Yogi | last post by:
Hi there, I have a quick question. In my html document, I want to make a new paragraph whenever I have a blank line in the html source. Using <p> and </pevery time is kind of cumbersome (I want...
4
by: coldy | last post by:
Hi, I have a large txt file (1GB) which I need to break into smaller files based on the contents of a column in the file. The values in the column of intrest starts low, then increases, then...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.