Wrote my script, figured it all out, everything worked (finally). Then I tried to change it over to a cgi, and I got some strange (for me) errors in the error_log file. I can post the entire code if necessary, but I'm not sure that would help.
First of all, the error:
Variable "$rsock" will not stay shared at... blah
This is my socket, declared thusly:
my $rsock = new IO::Socket::INET (PeerAddr => blah,
PeerPort=> 12345,
Proto => 'tcp',
);
Shared by whom? And how can I make it stay shared? And what does this have to do with Apache, anyway (when I run it from command it's fine).
Secondly, I'm calling a sub like so:
sendData("0x4c",1,"LOGON USERNAME=NAME PASSWORD=pass\0");
And I get the error:
Too many arguments for Apache::ROOT::benjamin::ILX::cgi_2dbin::report_
+2ecgi::sendData
Again, I don't understand why the web server is even worrying about this, these are arguments I'm trying to pass to my sub function...
Thank you in advance. I have been a little scared to post my questions here, but people where so fast, nice and helpful with my last series of questions that I fear no longer. Thanks!
Edit: chipmunk 2001-06-19
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.