sub p{@_=(2..pop);while($a=$_[0]){@_=grep{$_%$a}@_;$_.=" $a";}split' ';}
Be glad I didn't post the regex one.
In reply to Re: (Golf): Sieve of Eratosthenes
by chromatic
in thread (Golf): Sieve of Eratosthenes
by tilly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |