Note too that you can test your CGI script from the command line passing the CGI parameters on the command line to the script:
#!/usr/bin/perl use strict; use warnings; use CGI qw(); my $na = CGI::param('v1'); my $nb = CGI::param('v2'); my $oper = CGI::param('oper'); print CGI::header(); print "<p>$na $oper $nb</p>\n";
using a command line of v1=1 v2=2 oper="*" prints:
Content-Type: text/html; charset=ISO-8859-1 <p>1 * 2</p>
In reply to Re: CGI calculator
by GrandFather
in thread CGI calculator
by mwerner92
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |