sub sieve2 { grep{@_[map$a*$_,2..@_/($a=$_)]=0if$_[$_]>1}@_=0..pop; } for( @ARGV ) { print "$_: ",join(" ",sieve2($_)),$/; }