This is my first project in Perl, so be kind.
I have constructed a URL which contains a URL as the value to a query parameter. So, some ampersands need to be treated as ampersands separating query parameters, but others need to be changed so they aren't interpreted as separating query parameters.
Here's an example:
my $url_parm = 'http://www.whatzit.com?a=1&b=2'; $url =~ s/&/&/sg; my $url = "http:/www.xyzzy.com?url=$url";
Can someone point out the error of my ways?
Thanks.
In reply to encoding URL ampersands? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |