Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: saving cgi output as html

by arthas (Hermit)
on May 30, 2003 at 12:48 UTC ( [id://261834]=note: print w/replies, xml ) Need Help??


in reply to saving cgi output as html

Well, you can have you script print to a file instead of (or in addition to) the standard output. I.e.:
$doc = ''; open (MYOUT, ">/mypath/output.html") or die $!; $doc .= "<p>Mydata....</p>"; $doc .= "<p>Myotherdata....</p>"; print $doc; # This goes to the web browser print MYOUT $doc; # This goes to a files close (MYOUT);
Hope this helps!

Michele.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-19 16:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found