Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

How does 'goto LABEL' search for its label?

by moritz (Cardinal)
on Jan 16, 2013 at 13:50 UTC ( #1013574=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -wE 'if (0) { label: say 1 }; goto label'
    Can't find label label at -e line 1.
    ...
    Use of "goto" to jump into a construct is deprecated at -e line 1.
    1
    ^C # aborted, because it loops
    
  2. or download this
    
    #!/usr/bin/perl
    ...
    __END__
    here
    here
    
  3. or download this
    $ perl -wE 'sub g() { label: say "here" }; g; goto label'
    here
    Can't find label label at -e line 1.
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1013574]
Approved by marto
Front-paged by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (13)
As of 2014-07-23 17:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (147 votes), past polls