#!/usr/bin/perl -w use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); if (param('oldtable')){$oldtable=param('oldtable');} else {die 'This document must be opened with the oldtable parameter';} print start_html(-title=>foo, -BGCOLOR=>bar, -style=>{'src'=>foo,'title'=>bar}); print start_form, radio_group(-name=>'sortby',values=>['Sort by foo', 'Sort by bar']),p, submit(-name=>'search',-value=>'Search'), print end_form; if ($oldtable==1){foo;} if (param('search')) {param(-name=>'oldtable',-value=>'0'); bar; }