Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

How does 'goto LABEL' search for its label?

by moritz (Cardinal)
on Jan 16, 2013 at 13:50 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-19 23:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found