more useful options | |
PerlMonks |
Re^2: Challenge: A malicious electionby blokhead (Monsignor) |
on Jun 12, 2008 at 17:04 UTC ( [id://691725]=note: print w/replies, xml ) | Need Help?? |
Your comment in the spoiler made me think of this kind of an approach to
What it does wrong: Every value in %votes is a reference to the same array ref. So all votes are actually recorded for both candidates, and the election is a tie. This isn't ideal in terms of covertness, since the program reports twice as many votes as were cast.
What would be much nicer is if there is some way to sneak in a division-by-two on the votes, so there will always be the right number of votes (or one less). Perhaps someone can think of a way to sneak >>=1 in there? Or some cleverness in the printf template? I also think that since having the extra array ref in there is suspicious, one could try to store extra data in the array @{ $votes{$candidate} }. I couldn't think of anything very convincing though. blokhead
In Section
Meditations
|
|