> 
> > Why don't you simply append to the string? Am I missing something?
> 
> Because that would end up with something like:
> /investment/detail.epl?code=FOO&display=WOTSIT&it=BAR&code=007&new=YES
> I don't want 'code' twice!
> 
Aah, I see...


Then I would use a regex and a hash:

my $uriprefix = '/investment/detail.epl?code=FOO&display=WOTSIT&it=BAR';
my @parts     = split (/\?/, $uriprefix) ;
my %parms     = split (/\&|=/, $parts[1]) ;
$parms{'code'} = '007' ;
$parms{'new'} = 'YES' ;
$uriprefix = parts[0] . join ('&', %parms) ;
print $uriprefix, "\n";

It's not much shorter, but faster anyway

Gerald



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to