This is about 190 chars... shebang included. It can be tweaked by reducing the hardcoded 'boo' and 'congrats'. No fancy graphics...#!/usr/bin/perl $w='foobar';@w=split//,$w;for$a(0..7){$z=$a;print"guess\n";$_=<>;chomp +;$l{$_}++;@l=map{$f=$l{$_}?$_:"_"}@w;if(!grep{!$l{$_}}@w){last;}print +@l,$/;}print$z==7?'boo':'congrats'
In reply to (Golf) Hangman by Beatnik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |