In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/8bc5de207a4b3d333e9c6535bd21b8f0b1381270?hp=4a573b25e5d1b2bb3e3043a95e14fb595dbeca85>
- Log ----------------------------------------------------------------- commit 8bc5de207a4b3d333e9c6535bd21b8f0b1381270 Author: Shlomi Fish <[email protected]> Date: Fri Oct 10 10:12:09 2014 +0300 Modernized an example in perlipc.pod. 1. Convert to use strict + use warnings. 2. Changed a while(++ loop) to while(1) { ++ }. Committer revised patch per suggestions in RT # 122938. ----------------------------------------------------------------------- Summary of changes: pod/perlipc.pod | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pod/perlipc.pod b/pod/perlipc.pod index 2e80d0d..49c605b 100644 --- a/pod/perlipc.pod +++ b/pod/perlipc.pod @@ -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"; } } -- Perl5 Master Repository
