[Cialug] Shotgun?
Kenneth Ristau
kristau at kristau.net
Fri Aug 12 21:59:19 CDT 2005
Josh More wrote:
> Ok. Everyone interested in a downtown shotgun, rank the days by
> preference,
> with five being highest:
>
> Mon: 2
> Tue: 3
> Wed: 1
> Thur: 4
> Fri: 5
> After everyone has weighed in, the highest ranked day wins.
> Ties will be broken with /dev/random
Or, just choose the day randomly. perl can do this quite nicely:
#!/usr/bin/perl -w
%days = (0 => 'wednesday',
1 => 'friday',
2 => 'thursday',
3 => 'monday',
4 => 'tuesday');
for($i=rand(100); $i > 0; $i--)
{
$day = int(rand(5));
system('clear');
print( $days{$day} . "\n");
}
later,
kristau
--
Tired programmer
Coding late into the night
The core dump follows
My GNUPG public key is available at http://www.kristau.net/public_key.asc
More information about the Cialug
mailing list