use CGI ':standard'; print header, start_html('dinner delimma disposer'); if ( param('number') > 1 ) { print h1('Going to lunch [Step 2]'),p , "Where do you want to go?",start_form('Post',url()); for (1 .. param(number)) { print textfield("R","restaurant $_ ",50,50),br; } print hidden('hide',param(number)),submit(),endform; } elsif ( param('R') ) { @places = param('R'); @respond = ("That was an easy choice!","Why was that so difficult?","What a no-brainer!!!!","Duhhh!"); @choose = ("I'd go to","I choose","Let's go to","It's been forever since I've had","I know we ate there last week, but I love", "I want some man food at","You're driving to"); print h1($respond[rand @respond].' ' .$choose[rand @choose].' '.$places[rand @places].'!'); } else { print h1('Going to lunch [Step 1]'), p , "How many people want to go?",start_form('Post',url()), popup_menu('number', ['1','2','3','4','5','6','7','8'], '4'),submit(),endform; } print end_html;