- or download this
$pi .= $predigit; # <-- missing line
print $pi =~ s/^03/3./r;
- or download this
# The spigot algorithm for calculating the digits of Pi.
# http://www.cut-the-knot.org/Curriculum/Algorithms/SpigotForPi.shtml
...
print $pi, "\n";
- or download this
2a3
> use integer;
...
---
> $q = $q / 10;