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


in reply to (tye)Re3: (Golf): Sieve of Eratosthenes
in thread (Golf): Sieve of Eratosthenes

And almost a decade later I was randomly looking at this, and realized that it could be made shorter still.
sub sieve3 { grep{@_[map$a*$_,2..@_/($a=$_)]=0if$_[$_]>1}@_=0..pop }
Never give up on that last optimization!