Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 wandering the Monastery: (6)
As of 2014-11-29 06:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (203 votes), past polls