run.cgi?taki=222&act=foo&temp=bar
=~ s/taki(.*)\&//g;
=~ s/taki(.*?)&//g;
... =~ s/taki[^&]*(&|\z)//g;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#! /usr/bin/perl use strict; use warnings; use URI; my $url = 'run.cgi?taki=222&act=foo&temp=bar'; my $uri = URI->new( $url ); my %params = $uri->query_form; delete $params{taki}; $uri->query_form( %params ); print $uri->as_string;