Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Sub ref from string without eval

by Rhandom (Curate)
on Apr 03, 2012 at 13:38 UTC ( #963248=note: print w/ replies, xml ) Need Help??


in reply to Re: Sub ref from string without eval
in thread Sub ref from string without eval

Which is generalized even better as:

my $sub_ref = __PACKAGE__->can($x);

my @a=qw(random brilliant braindead); print $a[rand(@a)];


Comment on Re^2: Sub ref from string without eval
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2015-07-04 04:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls