in reply to Re^2: Prime number generator
in thread Prime number generator

Very slick! ++

It looks even nicer, I think, without whitespace, though I can't find a way to improve on your 57 ... yet! ...

$o=1;{$_{$o}=print$o.$/if++$o&&!grep!($o%$_),keys%_;redo}

Update:  Aha!  It took me some thinking, but here's 56 ...

$o=1;{$_{$o}=print$o.$/if++$o,!grep!($o%$_),keys%_;redo}

s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re^4: Prime number generator
by Ieronim (Friar) on Jul 17, 2006 at 20:42 UTC
    And this is 54 :)
    $o=1;{print$_[0+@_]=$o.$/if++$o,!grep!($o%$_),@_;redo}

         s;;Just-me-not-h-Ni-m-P-Ni-lm-I-ar-O-Ni;;tr?IerONim-?HAcker ?d;print
      Amazing! ++

      Of course, you can even make it 52 with a minor change ...

      $o=1;{print$_[@_]=$o.$"if++$o,!grep!($o%$_),@_;redo}

      s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/