Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Invoking a string reference to a anonymous subroutine

by davido (Cardinal)
on Jan 14, 2014 at 19:14 UTC ( [id://1070588]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -E 'our $p = sub { 1 }; my $q = "p"; say $$q->();'
    
  2. or download this
    perl -E 'my %dispatch = ( p => sub { 1 } ); my $q = "p"; say $dispatch
    +{$q}->();'
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1070588]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2024-04-26 02:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found