zli034 has asked for the wisdom of the Perl Monks concerning the following question:
What is the difference of big or small number by calling bignum module?
When my code tested on 2 digit small number it's good to run, but change to real large number it gives out error:
can't return outside a subroutine.....
When I again test the error subroutine individually with real big number, it works good again
The code has no problem otherwise small number won't run. But why it give error on large numbers?
Here is just little subroutine, tested good on itself
use bignum; $big_number = xxxxxx; #declared a 100 digits integer. $another_big_number=xxxxxx;# 100 digits. print operation($another_big_number); sub operation { my $product = eval $_[0]; return abs $big_number - $product; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: bignum, can't return outside a subroutine
by ikegami (Patriarch) on Oct 09, 2007 at 14:41 UTC | |
by zli034 (Monk) on Oct 09, 2007 at 23:07 UTC |