in reply to Re: Re: There's got to be a better way?
in thread There's got to be a better way?

Printing the word CHECKED is exactly what I want to do. I find it to be simpler to have the variables set in advance as opposed to incorporating them into my print statements which would then require an alternative else statement.
If you arrange things correctly, it will all work out right---which was what you were asking for. Change your HTML form to contain HTML code like this:
<input type=checkbox name='h04' value=' CHECKED '>
Now when the user checks the checkbox, $FORM{'h04'} will automatically contain the value you want, CHECKED. Then to print out your report, you just say:

print "Box 4: $FORM{h04}";
You no longer need the extra variables, because the form variables get the correct values in the first place. No else required.

--
Mark Dominus
Perl Paraphernalia