or download this
use strict;
use URI::Escape:
...
my $res = get("http://www.foo.com?data=".uri_escape("12 34+56")); #sen
+t as: data=12%2034%2B12, both space and "+" are escaped.
my $res2 = get("http://www.foo.com?data=12 34+56")); # sent as: date=1
+2%2034+56, i.e. space is escaped, but "+" is not.