summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
Diffstat (limited to 'pod')
-rw-r--r--pod/perlfunc.pod8
1 files changed, 4 insertions, 4 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 833e891825..9458d1cccf 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -2115,13 +2115,13 @@ integer which you can decode using unpack with the C<i> (or C<I>) format.
An example testing if Nagle's algorithm is turned on on a socket:
- use Socket;
+ use Socket qw(:all);
defined(my $tcp = getprotobyname("tcp"))
or die "Could not determine the protocol number for tcp";
- # my $tcp = Socket::IPPROTO_TCP; # Alternative
- my $packed = getsockopt($socket, $tcp, Socket::TCP_NODELAY)
- or die "Could not query TCP_NODELAY SOCKEt option: $!";
+ # my $tcp = IPPROTO_TCP; # Alternative
+ my $packed = getsockopt($socket, $tcp, TCP_NODELAY)
+ or die "Could not query TCP_NODELAY socket option: $!";
my $nodelay = unpack("I", $packed);
print "Nagle's algorithm is turned ", $nodelay ? "off\n" : "on\n";