Hi,
I want to call a sub, and I've been
using eval. The problem is that I know this
is not good and there must be a clever way.
I must confess that I am a C programmer =)
I've tried to use something like a pointer
to the functions with no success.
sub f1($){...}
sub f2($){...}
my $func;
if(something){
$func = 'f1';
}
else{
$func = 'f2';
}
my $ans= eval "$func(3);";
Thanks,
Nelson.-
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]