Use CGI's html generation methods.
# Assuming $q is from CGI->new my $url = $q->My::CGI::hypothetical_param( search => 'value' )->self_u +rl; sub My::CGI::hypothetical_param { my $current_q = shift; my $q = CGI->new( $current_q ); my $params = { @_ }; while ( my ( $param, $value ) = each %$params ) { if ( not defined $value ) { $q->delete ( $param ); } else { $q->param( $value ); } } $q; }
In reply to Re^3: Switching out text only in a variable
by diotalevi
in thread Switching out text only in a variable
by powerhouse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |