in reply to Re: •Re: Adding param to a specified URL
in thread Adding param to a specified URL
But the problem is if you're going to call this more than once, you really ought to hoist it up to the outer level, or give it more than one pair at a time, or it will be doggy slow. </code>use URI; sub add_param { my $url = shift; # string my $name = shift; # string my $value = shift; #string $url = URI->new($url); $url->query_form($url->query_form, $name, $value); return $url->as_string; }
-- Randal L. Schwartz, Perl hacker
|
|---|