• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 216
  • Last Modified:

CGI '?' '&' ...

Could someone / some people give working examples using QUERY_STRING method where the URL is of the form http://<somewhere>/<filename>?<something>.  Please don't refer me to books.
0
dtww
Asked:
dtww
1 Solution
 
henryjCommented:
Not sure why you want this - maybe your server is doing something odd and you want to check - but save this as test.pl (be sure
to convert crlf's to lf's if you're on UNIX).

#!/usr/bin/perl


$args=$ENV{'QUERY_STRING'};

print "content-type: text/html\n\n";
print "<html><body>\n";
print "Argument was $args\n";
print "</body></html>\n";


When you call /cgi-bin/test.pl?argument1 it should print out
argument1. Is this what you were after?

henry

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now