use strict; use warnings; use Socket; my $protocol = getprotobyname("tcp"); print $protocol; socket(my $socket, PF_INET, SOCK_STREAM, $protocol);