Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: while loop question

by Rudolf (Pilgrim)
on Sep 06, 2012 at 13:32 UTC ( #992085=note: print w/replies, xml ) Need Help??


in reply to while loop question

would the continue statement still execute after the loop has ended the last time?

while(x){}continue{};

Replies are listed 'Best First'.
Re^2: while loop question
by Freezer (Sexton) on Sep 06, 2012 at 13:42 UTC
    Does continue behave differently in the two circumstances that I have mentioned?
      Yes. continue {} block will not be executed if last is used.

        ah okay, thanks I should have remembered that!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://992085]
help
Chatterbox?
[shmem]: Discipulus: the <<>> operator is quite new, it is in perl5.24 for instance
[Discipulus]: ah! thanks shmem it works in strawberry 5.24
[shmem]: ah. Introduced in 5.22.0, see perl5220delta
[Discipulus]: if so the previous error is a bit misleading, anyway
[shmem]: well, previous to that << was always treated as the left-shift operator
[Eily]: or the here-doc operator
[Eily]: which is actually how it is parsed in this case
[shmem]: older versions of perl can't guess that "use of <<>> may be implemented someday" :D

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2017-07-21 09:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (320 votes). Check out past polls.