CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions:
STDIN & STDOUT

 



Pro_4
User

Apr 24, 2001, 2:00 PM

Post #1 of 8 (2064 views)
STDIN & STDOUT Can't Post

I read in a perl book that stdin and stdout take in information that is input through the keyboard. I understand the concept for using it on your computer programs but how about web applications? Is STDIN and STDOUT used in cgi programs on sites?

Always add fun to Perl
$fun = "fun"; $perl = "Perl";
print " Always add $fun to $perl"; die;


Jean
User


Apr 24, 2001, 11:02 PM

Post #2 of 8 (2061 views)
Re: STDIN & STDOUT [In reply to] Can't Post

My guess is that STDIN and STDOUT are not applicable in other than console applications,
though you can always redirect them, say, to a file and continue to use them even in cgi.

Jean Spector
QA Engineer @ Extent Technologies, Ltd.
mage@lycosmail.com


Pro_4
User

Apr 25, 2001, 11:58 AM

Post #3 of 8 (2057 views)
Re: STDIN & STDOUT [In reply to] Can't Post

OK thats what it thought. Thanks for the info.

:)

Always add fun to Perl
$fun = "fun"; $perl = "Perl";
print " Always add $fun to $perl"; die;


japhy
Enthusiast / Moderator

Apr 25, 2001, 3:42 PM

Post #4 of 8 (2055 views)
Re: STDIN & STDOUT [In reply to] Can't Post

Where do you think you get POST query data from? Where do you think you print to?

Jeff "japhy" Pinyan -- accomplished hacker, teacher, lecturer, and author


Pro_4
User

Apr 26, 2001, 1:52 PM

Post #5 of 8 (2051 views)
Re: STDIN & STDOUT [In reply to] Can't Post

Well.. that is why i asked the question.. so i could find out what it did do.

:)

Always add fun to Perl
$fun = "fun"; $perl = "Perl";
print " Always add $fun to $perl"; die;


Jean
User


Apr 28, 2001, 11:20 PM

Post #6 of 8 (2039 views)
Re: STDIN & STDOUT [In reply to] Can't Post

Sorry for misguiding you.
I shouldn't have answered in the first place as I'm not familiar with CGI at all.
The only "good" thing in my post is the word guess and that's what my aswer was - a guess :-(

Jean Spector
QA Engineer @ Extent Technologies, Ltd.
mage@lycosmail.com


Pro_4
User

Apr 29, 2001, 6:24 AM

Post #7 of 8 (2038 views)
Re: STDIN & STDOUT [In reply to] Can't Post

It's not a problem. Atleast you attempted to answer my question.

People Engrossed by a Reliable Language


localfilmmaker
stranger

May 8, 2001, 11:26 AM

Post #8 of 8 (2010 views)
Re: STDIN & STDOUT [In reply to] Can't Post

STDIN, STDOUT, and STDERR are all used in CGI scripts as well as console programs. With CGI scripts, the web server that executes your CGI scripts will send all CGI params to you script's STDIN for it to read. And then it will get all output from the script's STDOUT and return it as the response to the browser. Depending on the web server, any errors or warnings printed to STDERR will either get printed with your STDOUT as part of the response, or it will be ignored or logged in a log file. That's how it usually works.

-localfilmmaker
Spencer Christensen
spencer@mecworks.com

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives