#!/usr/bin/perl -T use strict; use warnings; use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); use Data::Dumper; print "Content-type: text/plain\n\n"; my $color=param('color'); print Dumper($color); exit; print "Your chosen color is $color.\n";
It's useful when the script is big and all you want is to check a variable in a middle of it.# ./color.cgi color=red Content-type: text/plain $VAR1 = 'red';
In reply to Re: Re: CGI Command Line
by bhappy
in thread CGI Command Line
by JoeJaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |