but I prefer to do $func_ref->("bla")#!perl -w use strict; sub my_func { print @_; } my %hash = ( "my_function" => \&my_func ); my $func_ref = $hash{"my_function"}; &$func_ref("bla");
Had you posted a working code snipped, chances are you'd have found out for yourself ;-)
In reply to Re: Calling a function reference with arguments
by Joost
in thread Calling a function reference with arguments
by Zubinix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |