Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Defining a sub within a sub: OK?

by moritz (Cardinal)
on Oct 14, 2009 at 23:06 UTC ( #801236=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -E 'say 1, foo; sub foo { 3  }'
    1foo
    ...
    13
    $ perl -E 'say 1, foo(); sub foo { 3  }'
    13
    
  2. or download this
    $ perl -E 'eval "sub foo { 3 }"; say 1, foo();'
    13
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://801236]
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: (6)
As of 2019-06-26 22:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (111 votes). Check out past polls.

    Notices?