What makes you think it's a problem returning a big num from the subroutine? There's no evidence of that. Problem: use bignum; isn't in effect in the eval. Fix:
sub operation { my ($arg) = @_; my $product = eval "use bignum; $arg"; return abs $big_number - $product; }
Or use the existing bignum instead of making a new one.
sub operation { my ($arg) = @_; my $product = eval "\$arg"; return abs $big_number - $product; }
In reply to Re: bignum, can't return outside a subroutine
by ikegami
in thread bignum, can't return outside a subroutine
by zli034
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |