Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 musing on the Monastery: (5)
As of 2014-08-30 13:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (293 votes), past polls