[tpm] IO::Socket::INET listening on the 2nd ip address

Antonio Sun antoniosun at lavabit.com
Tue Feb 8 06:03:47 PST 2011


I have the following code,

 $sock = new IO::Socket::INET (  LocalHost => '',
                                LocalPort => '80',
                                Proto => 'tcp',
                                Listen => 30,
                                Reuse => 1);

which will fail because my port 80 on localhost is used by web server.
How can I change the code to listen on the 2nd ip address?

I.e., my current IP address is, it is
also accessible at I want that visiting will
land to my normal web server, while visiting will be handled
by the code above.

Please help.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20110208/4e3b10c6/attachment.html>

More information about the toronto-pm mailing list