Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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.


Comment on Re: (Golf): Sieve of Eratosthenes
Download Code

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 chilling in the Monastery: (11)
As of 2014-12-21 14:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (105 votes), past polls