in reply to Golf -- compute PI

How about e:
use integer;$|++;my@e=(1)x5e3;for(a..zzz){$e[$_-1]+=$e[$_]/$_,$e[$_]%= +$_ for reverse 1..$#e;print$e[0];$e[0]=0;$_*=10for@e;}

Replies are listed 'Best First'.
Re^2: Golf -- compute PI
by thospel (Hermit) on Jan 21, 2007 at 12:21 UTC
    Compute e to 1000 digits, 69 chars
    s!\w+!$%=($z=$&.0+$%)/($a=--$?||10);$z%$a!eg,print$%for(-1x65536)x1e3