summaryrefslogtreecommitdiff
path: root/pod/perlipc.pod
diff options
context:
space:
mode:
Diffstat (limited to 'pod/perlipc.pod')
-rw-r--r--pod/perlipc.pod10
1 files changed, 5 insertions, 5 deletions
diff --git a/pod/perlipc.pod b/pod/perlipc.pod
index a2f3f8b16d..5a43660fb2 100644
--- a/pod/perlipc.pod
+++ b/pod/perlipc.pod
@@ -34,10 +34,10 @@ Here's a sample TCP client.
gethostbyname($hostname);
($name, $aliases, $type, $len, $thataddr) = gethostbyname($them);
- $this = pack($sockaddr, &AF_INET, 0, $thisaddr);
- $that = pack($sockaddr, &AF_INET, $port, $thataddr);
+ $this = pack($sockaddr, AF_INET, 0, $thisaddr);
+ $that = pack($sockaddr, AF_INET, $port, $thataddr);
- socket(S, &PF_INET, &SOCK_STREAM, $proto) || die "socket: $!";
+ socket(S, PF_INET, SOCK_STREAM, $proto) || die "socket: $!";
bind(S, $this) || die "bind: $!";
connect(S, $that) || die "connect: $!";
@@ -69,11 +69,11 @@ And here's a server:
($name, $aliases, $port) = getservbyname($port, 'tcp')
unless $port =~ /^\d+$/;
- $this = pack($sockaddr, &AF_INET, $port, "\0\0\0\0");
+ $this = pack($sockaddr, AF_INET, $port, "\0\0\0\0");
select(NS); $| = 1; select(stdout);
- socket(S, &PF_INET, &SOCK_STREAM, $proto) || die "socket: $!";
+ socket(S, PF_INET, SOCK_STREAM, $proto) || die "socket: $!";
bind(S, $this) || die "bind: $!";
listen(S, 5) || die "connect: $!";