in reply to Ballsy coding
in thread "Ate My Balls" Syntax Generator

Whoops, I'm new here and didn't realize comments were html-ized. That line of code should read:

print "@groups[rand($#groups + 1)]\n";

That is all.

Replies are listed 'Best First'.
RE: RE: Ballsy coding
by chromatic (Archbishop) on Apr 20, 2000 at 20:59 UTC
    Hmm, even shorter to say: print $groups[rand(@groups)], "\n"; Did the OP mean to take an array slice?
RE: RE: Ballsy coding
by Anonymous Monk on Apr 20, 2000 at 20:46 UTC

    Or rather:

    print "@groups[rand($#groups + 1)]\n";

    Phew, a "preview post" button would've helped though...