This may be a bit of a beginner question but...
I have function f(@a).
I would like to create another function, F(f(),\@a,$n), which can take
f() as the parameter with its operands seperately.
i.e.
F(f(),\@a,$n);
##---- Simplified sample vv
sub f {
my $array = shift;
print "$array[0]\n";
}
sub F {
my $func = shift;
my $array = shift;
my $value = shift;
my @tmp = splice(@{$list},$window);
##-- Here $func should be f(@tmp). How do I do this?
return eval($func(@tmp));
}
##---- ^^
- Re: recursive calls to unknown functions? todd shifflett
- Re: recursive calls to unknown functions? David Iberri
