On Tue, Aug 9, 2016 at 3:49 AM, Theo van den Heuvel <vdheu...@heuvelhlt.nl>

> I have string variable and want to execute a function with that name. How
> do I call that function?
>   sub bar { say "Hi" }
>   my $subname = 'bar';
>   # how to call the sub whose name I have?
>   "$name".();  # gives me "No such method 'CALL-ME' for invocant of type
> 'Str'"

pyanfar Z$ p6 'sub szs { say "hi" }; my $b = "&szs"; ::($b)()'

brandon s allbery kf8nh                               sine nomine associates
allber...@gmail.com                                  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

Reply via email to