in reply to Making webpages from a single CGI

After you get the param info (from using CGI.pm, of course), if you wanted to execute a particular sub based on a param, you could do something like this (untested):

my %nodes = ( 'page1' => \&home, 'something' => \&something, 'another' => \&another ); ##later on... ##stolen from The Perl Cookbook ##assuming that page wanted is in $current_screen while(my ($wanted_screen, $function) = each %nodes) { $function->($wanted_screen eq $current_screen); } sub page1($) { my $active = shift; ##do stuff here based on whether its active or not } ##declare other subs here, taking a true or false value as an arg as s +hown above
Sorry if this seems too offtopic, but I found it very helpful in situations like yours. Also note that appropiate function is called the way above instead of a simpler way so that if you needed to keep smacking hidden values into the html of your page that are called as params too, you can do it every time the script is invoked.

Hope it helps!!