Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
$number wasn't guaranteed to be a whole number (and I guess that makes % fail) No, Perl is OK with that:
But the original loop almost certainly wasn’t doing what you thought it was. With an initial value of 192:
The loop terminates when $number is zero, but (on my Perl, which is 64-bit) this test doesn’t succeed until division by two has reduced $number all the way down to half of 4.94065645841247 × 10-324 — which is a very small number! Hope that helps,
In reply to Re^3: I need help with the error "Modification of non-creatable array value attempted"
by Athanasius
|
|