note
chipmunk
This solution is very similar to japhy's, although I started it without looking at his. I did use his solutions to inspire me to shorten mine, though!
<p><b>57 characters</b>:
<code>sub sieve {
my@p;@_=2..pop;{push@p,$p=shift;redo if@_=grep$_%$p,@_}@p
}
</code>
<b>58 characters</b>, strict-compliant:
<code>sub sieve {
my@p;@_=2..pop;{push@p,shift;redo if@_=grep$_%$p[-1],@_}@p
}
</code>
BTW, what is the Big-O of the Sieve of Eratosthenes? :)
81695
81695