AFAIK, IO::Socket::INET->new() does not set $!
It's poorly documented, but IO::Socket and its INET subclass put their informative errors into $@. So, the OP wants something like:
my $s = IO::Socket::INET->new(...) or die "new sock: $@\n";
-pilcrow
In reply to Re^2: Could not create socket: Bad file number
by pilcrow
in thread Could not create socket: Bad file number
by perlofwisdom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |