in reply to Re: Vote decider
in thread Vote decider

Avoid writing literals like 4 into your source code and use the length of the array as an argument for itself.

print $parties[ rand @parties ];

Or.

my $party_ix = rand @parties; print $parties[ $party_ix ];

Replies are listed 'Best First'.
Re^3: Vote decider
by mawe (Hermit) on Jun 29, 2004 at 05:19 UTC
    Good point! Thank you!

    mawe