$passeddata =~ s/([!@#$%^&()_+\n])/sprintf("%%%02x",ord($1))/eg; $passeddata =~ s/\s/+/g;