Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Creating subroutines on the fly

by hakkr (Chaplain)
on Feb 16, 2005 at 17:38 UTC ( #431656=note: print w/replies, xml ) Need Help??


in reply to Re: Creating subroutines on the fly
in thread Creating subroutines on the fly

hi you dont need to use eval although it is probably safer,
my $subref = sub {print "hello"}; &$subref();

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2023-02-08 06:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (40 votes). Check out past polls.

    Notices?