sub process {
while(@_) {
my $line = shift @_;
.
.
.
}
print $new_sock, "Done.\n";
shutdown $newsock, 0;
}
That way it will execute every command that you give it and then close the socket properly. Also, any "returns" in your process() function should be changed to "nexts".
lhoward also makes a good point about security.
In reply to Re: Socket programming & CGI hell
by dbrown
in thread Socket programming & CGI hell
by TQuid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |