#!/bin/perl require "cgi-lib.pl"; if (&ReadParse(*input)) { print &PrintHeader; print " Hangman "; print "

The Hangman Game ...

"; if ($input{'done'} eq 'done') # the person guessed the word { if ($input{'real'} eq $input{'new'}) # did they get it right? {print 'You were right.';} else {print 'You were WRONG!

'; print 'It was really ',$input{'real'},'.';} print '

Click

Or if you are daring type in what you think that the word is.

EOF } else{ print < The correct answer is $input{'real'}.

click here to play again. EOF } } else { print &PrintHeader; print ' Hangman '; print '

Hangman Game.


'; $real = "first"; $num = length($real); for ($i=1;$i<=$num;$i++) { print '_ '; } print '

'; print '

'; print 'Type in your first guess at the above unknown word.

'; print <

Or if you are daring type in what you think that the word is.

EOF }