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 (22)
- perl cgi query string (17)
- perl get query string (14)
- perl querystring (10)
- perl cgi get query string (9)
- perl cgi print query string (7)
- get query string value using jquery (5)
- perl query string cgi (4)
- perl query string from url (4)
- query string perl (4)
- get query string in perl (4)
- how to get query string in perl (4)
- perl get querystring (4)
- get query string value in html (3)
- how to get url query string in perl (3)
- perl display time (3)
- Query String in Perl (3)
- perl cgi query string example (3)
- perl cgi dump query string to file (3)
- perl cgi script examples query string (3)
- query string in perl cgi (3)
- cgi get string (3)
- cgi perl query string (3)
- cgi query string (3)
- perl cgi query string parameters (3)
- perl cgi get querystring (3)
- perl query string value (2)
- $query->param(script); tutorial (2)
- how to get string cgi (2)
- CGI get query string (2)
- how to get query string value in wp (2)
- perl querystring example (2)
- perl param cgi request querystring (2)
- tutorial perl query string (2)
- querystring perl (2)
- perl query string tutorial (2)
- perl get query string value (2)
- perl query string example (2)
- cgi script post QUERY_STRING tut (2)
- cgi script query string (2)
You will also be interested in ,
- Setup a smtp server on your localsystem or server using hmailserver and send email
- Change webpage background color using javascript
- Simple Code To Set And Retrieve Cookie Using PHP
- Exclamation mark (!) at odd places while using php mail fixed
- Secure PHP Scripts
- Find files inside a directory that starts with a specific string using php
- Date in title bar using php
- Detect the user Operating System flavour using php
- How to check browser javascript enabled?
- Include files in php using include, include_once, require or require_once
