eduardo challenged me to write the smallest sieve of
Erothenes that I could. Here's what I came up with...
/\/\averick
/\/\averick
foreach (1..100) { push @_,$_; foreach (@_[1..($#_-1)]) { pop @_ and last unless ($_[-1] % $_); } } print join(" ",@_),"\n";
Back to
Cool Uses for Perl