Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: (Golf): Sieve of Eratosthenes

by chromatic (Archbishop)
on May 19, 2001 at 21:45 UTC ( #81739=note: print w/ replies, xml ) Need Help??


in reply to (Golf): Sieve of Eratosthenes

72, and there's some nasty bits at the end:

sub p{@_=(2..pop);while($a=$_[0]){@_=grep{$_%$a}@_;$_.=" $a";}split' ';}

Be glad I didn't post the regex one.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://81739]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2016-08-24 06:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (338 votes). Check out past polls.