Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: CGI calculator

by GrandFather (Saint)
on Jul 07, 2016 at 02:38 UTC ( [id://1167351]=note: print w/replies, xml ) Need Help??


in reply to CGI calculator

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>
Premature optimization is the root of all job security

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1167351]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-24 02:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found