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

Re^2: typeglob/symbolic reference question

by 7stud (Deacon)
on Nov 04, 2010 at 01:41 UTC ( [id://869382]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $scalar_ref = \10;
    my $x = ${$scalar_ref}; 
    ...
    
    my $sub_ref = sub {print "hello\n"};
    &{$sub_ref}();
    
  2. or download this
    #setup:
    -------
    ...
     
    &{"color"}();   #grab the subroutine slot for 'color' 
                    #and execute the sub
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-20 08:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found