i think you need to learn the difference between a cgi program, which is a program that processes and/or generates web pages, and a normal (non-cgi) program. A CGI program takes its' parameters from HTML forms and receives them via param{'var_name'} call. This is the CGI interface. When you are calling your background process directly from another program, the interface is standard (not redirected) input/output and @ARGV to get at arguments passed to it. Mind you, you have to be very careful in the design of both the CGI program and your background process, as the web users will potentially create many instances of those programs in memory simultaneously. Therefore, if your programs deal with any files, they must be written as not to interfere with each other or corrupt files.
I recommend that you borrow/buy a book on perl CGI to learn a great deal more....CGI programs, i.e. perl programs that "use CGI;" have their standard input,output,and error handles re-directed. it's like switching from programming for a console app. to a windows based app., input/output and standard arguments are handled differently.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.