in reply to Re^2: Error "undefined value as a symbol reference "
in thread Error "undefined value as a symbol reference "

When you open your socket, you can do something else if it didn't open. For instance, if you wanted the program to end immediately:

my $server = IO::Socket::INET->new ( LocalPort => 8080, Type => SOCK_STREAM, Reuse => 1, Listen => 10) or die ("Can't open socket : $!");

It's a good idea to check anything that has a potential to fail. (opening files, closing files that you've written to, opening database connections, etc.)

Replies are listed 'Best First'.
Re^4: Error "undefined value as a symbol reference "
by Anonymous Monk on Apr 22, 2005 at 11:59 UTC
    After an implementing this correction, got a new error:
    Software error:
    Can't open socket: Address already in use at /home/www/myspace.superihost.com/cgi-bin/script.pl line 10.

      Then it looks like either another instance of your script or some other program is already using port 8080 - you can check this by telnetting to that part to see if you can connect or by using netstat -l, you can find the actual program that has the port open by doing sudo /usr/sbin/lsof -i:80 | grep LISTEN (if you have lsof that is.) If you are not committed to this port, try using another one.

      /J\

        check this on a remote shared hosting? not sure that's possible.