Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 taking refuge in the Monastery: (12)
As of 2015-01-28 23:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (227 votes), past polls