What you need to understand is how the CGI process works. You have a slightly different environment to the traditional unix shell setup. While STDOUT certainly exists - if your CGI program is generating a web page "on the fly", STDOUT is what is passed back to the web server, and then to the user's browser.
What you do have is (and I will try to show it diagramatically):
So the only way for the user to interact with the cgi program is via values passed to the browser, either as part of the url (the GET method) or associated in a pseudo file (POST). If you are using CGI.pm (the recommended way), then these values are presented to your CGI program in a consistent, easy to access way.User ======> Web Server =====> (CGI request via GET requests sees CGIExec or POST) URL page type * program gets paramaters * generates web page ohhahh<===== sends page <===== * sends page through STDOUT users back in the sees my standard http wonderful manner generated page
Hope this helps. You can look at the CGI.pm documentation at http://stein.cshl.org/WWW/software/CGI/cgi_docs.html - Lincoln Stein is probably the expert on CGI perl programs.
In reply to Re:(Maclir) Re: (Ovid - CGI or command line?) Re(3): Prompting user input (newbie)
by Maclir
in thread Prompting user input (newbie)
by lauragarcia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |