Is your Perl script (1) listening to the network, or is it (2) a CGI script called by Apache?
(1) What Library are you using to listen to the network, or are you using
Socket directly?
Or (2) What CGI library are you using, or did you just code it all yourself?
(1) You can easily use netcat in server mode (or ksh has a built in web server, afaik) or roll a quick server in perl to feed your script the test data
or (2) you need to use
set REQUEST_METHOD=GET and
set "QUERY_STRING=userid=1234&username=testuser* You may also need
set HTTP_COOKIE=sessid=sess_1; then your script will think the web server is feeding it the data.
*Note that on windows, you dont' want to close the ". cmd.exe is easily confused and will usually append it to your variable, causing annoying bugs
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.