Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • We recently had our county legislative district caucuses for the Republican Party. The party rules say, in some cases, in the event of a tie, to decide the winner by lot. We had a 7-way tie (with each potential delegate assigned a number), for 6 positions (and since this was for alternate delegates, we needed them in a specific order).

    So I whipped out my laptop and wrote something along the lines of:

    perl -le '@a=qw(6 23 57 72 75 78 80); print $a[rand @a]'

    Got a winner, then removed that winner from @a