in reply to Eratosthenes Sieve

Not to be a pain in the ass, but I noticed yours always gives the seed number as the last element of the list. I thought the method only gave the seed number if it was prime. I took a look at the link you have above and it seems to confirm this. I made your <'s into <='s and it works like The Others.

sub Eratosthenes_Sieve($){ for(@a=(1)x($_[0]+1),$p=2; $p**2<=$_[0];){for($j=2*$p ;$j<=$_[0];$j+=$p){$a[$j]= 0}for($a[++$p]){}}grep {$a [$_]}(2..$#a)}

Ira,

"So... What do all these little arrows mean?"
~unknown