In this tutorial we will see how to get the query string value using very simple perl CGI script.
When we hit a URL from the web browser with a query string say
http://mistonline.in/cgi/data.cgi?program=php
In which program=php is the query passed.Now we will see how we get the same value using perl CGI script.
Here is the code
-
#!/usr/bin/perl
-
#Script From Mistonline.in
-
use strict;
-
use CGI;
-
my $cgi = new CGI;
-
print
-
$cgi->header() .
-
$cgi->start_html( -title => ‘Cgi Query String Results‘) .
-
$cgi->h1(‘Values Passed’) . “\n“;
-
my @params = $cgi->param();
-
print ‘<table border=”1″ cellspacing=”0″ cellpadding=”0″>’ . “\n“;
-
foreach my $parameter (sort @params) {
-
print “<tr><th>$parameter</th><td>” . $cgi->param($parameter) . “</td></tr>\n“;
-
}
-
print “</table>\n“;
-
print $cgi->end_html . “\n“;
-
exit (0);
Incoming search terms:
- perl query string (27)
- perl cgi query string (23)
- perl get query string (17)
- perl cgi get query string (11)
- perl querystring (11)
- perl cgi print query string (9)
- perl get querystring (7)
- querystring perl (6)
- get query string value using jquery (5)
- query string perl (4)
- get query string in perl (4)
- how to get query string in perl (4)
- perl query string cgi (4)
- perl query string from url (4)
- Query String in Perl (4)
- get query string perl (3)
- cgi perl query string (3)
- perl cgi query string example (3)
- perl cgi dump query string to file (3)
- how to get url query string in perl (3)
- query string in perl cgi (3)
- cgi get string (3)
- perl cgi get querystring (3)
- perl get querystring value (3)
- inurl:/stlfbbs cgi (3)
- perl cgi query string parameters (3)
- perl cgi script examples query string (3)
- cgi query string (3)
- perl query string get parameter (2)
- perl query string tutorial (2)
- perl querystring example (2)
- query string en perl (2)
- perl get query string from url (2)
- how to get string cgi (2)
- perl query string example (2)
- get query string value perl (2)
- perl print query string (2)
- how to get query string value in wp (2)
- perl param cgi request querystring (2)
- jqGrid CGI->new (2)
You will also be interested in ,
- Slide in and out animate div vertically using jquery
- Image preloader using CSS
- Check whether url or domain exists using php
- Find the string and then the line number using php from text file
- Find out which mode php is running CGI or DSO mode
- Locking a text file database using php
- Using no-cache for Stop Caching in Firefox and Internet Explorer
- Simple file upload script using php
- Adding a draggable div along with the cursor using simple javascript
- Buzzing or vibrating the login form using jquery

