Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    use warnings;
    ...
    my $url_parm = uri_escape 'http://www.whatzit.com?a=1&b=2';
    my $url = "http:/www.xyzzy.com?url=$url_parm";
    print $url, "\n";
    
  2. or download this
    my $url_parm = 'http://www.whatzit.com?a=1&b=2';
    $url_parm =~ s/&/&/sg;
    my $url = "http:/www.xyzzy.com?url=$url_parm";