use CGI qw(:standard); # easiest and safest way to do this # ... if (param()) { # Parameters were passed in: like button clicks, # text box contents, radio selections, etc. # Do something here like # if (param('S1') eq 'Send') { ... } } else { # Write HTML to produce the "baseline page" # Like # print "" }