This is something that I just did for fun. I do not support either candidate, election day for me is an attempt to pick the lesser of two evils :).#!/usr/bin/perl -w use strict; ############################# # # # The Bush Kerry camaign, # # a perl approach. # # # ############################# our @issues = (1,2,3,4,5,6,7,8,9); our $candidate = ""; our ($seconds, $minutes, $hours, $mday, $month, $year, $wday, $yday, $ +isdst) = localtime; my $x = 0; while($month != 11) { if($x%2 == 0) { $candidate = "Bush"; &campaign("Bush"); } else { $candidate = "Kerry"; &campaign("Kerry"); } $x++ } sub campaign { if($_[0] eq "Bush") { pop @issues; my $issues = @issues; } if($_[0] eq "Kerry") { shift @issues; my $issues = @issues; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: The Election
by CountZero (Bishop) on Sep 15, 2004 at 20:32 UTC | |
by Ven'Tatsu (Deacon) on Sep 15, 2004 at 21:41 UTC |