Special characters characters PERL CGI CLI

When I use the Mark Mark (?) Character in the CLI parameter, it does not populate the value (using http://search.cpan.org/dist/CGI/lib/CGI.pm#DEBUGGING ). Even if he escaped.

This will not populate "param" at all:

perl httpPost.pl param = "http://www.test.com/?user=test"

perl httpPost.pl param = "http://www.test.com/\?user=test"

Will this return the characters until?

+4
source share
1 answer

The URL must be encoded, so characters that are special for the URLs will be converted to% XX strings. These character strings will be decoded on the other hand.

There are several modules in CPAN that will help you with url encoding. here are a few:

and more broadly: MetaCPAN search for url_encode

+3
source

Source: https://habr.com/ru/post/1447922/


All Articles