my $url_group = $query->param('url_group'); print start_form(-action=>"test_form.pl?$url_group"); print $query->defaults; print end_form; #### use strict; use warnings 'all'; use CGI qw(:standard); my $query = CGI->new(); my $url_group; if ($query->param('url_group') =~ m/^(Boston[1|2|3])$/) { $url_group = 'url_group=' . $query->param('url_group'); } print header, start_html; print "

\$query->param('url_group') = \"" . $query->param('url_group') . "\"

"; print p("The value of \$url_group is: $url_group"); print start_form(-action=>"test_form.pl?$url_group"); print $query->defaults("This doesn't pass the group"); print end_form; print end_html; print p("This does work") if ($url_group);