Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Is it possible to use a scalar to call a subroutine?

by BrowserUk (Patriarch)
on May 06, 2010 at 16:56 UTC ( [id://838757]=note: print w/replies, xml ) Need Help??


in reply to Is it possible to use a scalar to call a subroutine?

sub doThis{ print "doThis doing this with $_[0]"; };; { no strict 'refs'; my $sub = 'doThis'; $sub->('fred'); };; doThis doing this with fred

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-25 12:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found