How can I read the URL parameter in a Perl CGI program?

后端 未结 3 1923
耶瑟儿~
耶瑟儿~ 2020-12-31 20:25

How can I read the URL parameter in a Perl CGI program?

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-31 21:30

    It's recommended that you use a URL parser such as mentioned by ysth, but if you REALLY want the raw input, it's available through the following:

    for GET:

    $contents = $ENV{'QUERY_STRING'};
    

    for POST:

    $contents = ;
    

提交回复
热议问题