http://www.perlmonks.org?node_id=159541


in reply to Golf -- compute PI

Here's one using Archimedes's method that comes in at 67:

$n=3;$s=1;for(1..9){$n*=2;$s=(2-(4-$s**2)**.5)**.5;$p=$n*$s}print$p

As a side note, I had $_ instead of $p inside the curlies, but using just print outside didn't work, and I don't know why.

Pepik