Urlencode a string in #perl
Quick script able to urlencode a string without the needing of importing modules
$mystring = "String to encode";
$mystring =~ s/([\W])/"%" . uc(sprintf("%2.2x",ord($1)))/eg;
print $mystring;
# Returns String%20to%20encode
Quick script able to urlencode a string without the needing of importing modules
$mystring = "String to encode";
$mystring =~ s/([\W])/"%" . uc(sprintf("%2.2x",ord($1)))/eg;
print $mystring;
# Returns String%20to%20encode