![]() |
|
Perl-Sensitive Sunglasses | |
PerlMonks |
Re^6: Perl can't make some easy arithmetics :(by no_slogan (Deacon) |
on Oct 24, 2014 at 22:19 UTC ( #1104925=note: print w/replies, xml ) | Need Help?? |
To explain further: use bigint only causes numeric literals to become bigints. It does not change the meaning of operators (like -), no matter what the perldoc might lead you to believe. 0 is a literal, and becomes a bigint. $a and $b are strings, and do not become bigints unless you add 0 to them. Just saying "$a-$b" does not trigger bigint conversion.
Edit: Here's a quick demonstration:
In Section
Seekers of Perl Wisdom
|
|