This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlvar: %LAST_MATCH_START is not %-
[perl5.git] / pod / perlipc.pod
index 2e80d0d..33362c1 100644 (file)
@@ -188,12 +188,15 @@ itself every time the C<SIGHUP> signal is received. The actual code is
 located in the subroutine C<code()>, which just prints some debugging
 info to show that it works; it should be replaced with the real code.
 
-  #!/usr/bin/perl -w
+  #!/usr/bin/perl
+
+  use strict;
+  use warnings;
 
   use POSIX ();
   use FindBin ();
   use File::Basename ();
-  use File::Spec::Functions;
+  use File::Spec::Functions qw(catfile);
 
   $| = 1;
 
@@ -214,9 +217,9 @@ info to show that it works; it should be replaced with the real code.
       print "PID: $$\n";
       print "ARGV: @ARGV\n";
       my $count = 0;
-      while (++$count) {
+      while (1) {
           sleep 2;
-          print "$count\n";
+          print ++$count, "\n";
       }
   }
 
@@ -975,8 +978,6 @@ or firewall machine), fill this in with your real address instead.
 
     my $paddr;
 
-    $SIG{CHLD} = \&REAPER;
-
     for ( ; $paddr = accept(Client, Server); close Client) {
         my($port, $iaddr) = sockaddr_in($paddr);
         my $name = gethostbyaddr($iaddr, AF_INET);