use IO::Socket::INET; my $sock = IO::Socket::INET->new(Proto=>shift); print "sock=$sock\n"; on 5.8.4 perl -w test.pl tcp = ok perl -w test.pl udp = ok perl -w test.pl icmp = ok on 5.8.6 perl -w test.pl tcp = ok perl -w test.pl udp = ok perl -w test.pl icmp = NO