Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: saving cgi output as html

by cbro (Pilgrim)
on May 30, 2003 at 12:53 UTC ( #261836=note: print w/ replies, xml ) Need Help??


in reply to saving cgi output as html

You could run your CGI script via command line and redirect the output to a file.

perl myscript.cgi name='user name' dob='September 2003' > need.html
Where 'name' and 'dob' are the names of the form entities you'd normally fill out/check/click and the strings are the values that would be assigned if you had filled out/checked/clicked said form objects.
UPDATE:
Another monk advised me that this would be a little too much to type on the command line if you had several form elements. So, if you do, put them into a file:
$cat input.txt name='user name' dob='Sep 2003' state='IL' city='Chicago' county='cook'
So the script could be run as:
perl myscript.cgi < input.txt > output.html


Comment on Re: saving cgi output as html
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (12)
As of 2014-12-26 20:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (175 votes), past polls