Based on an off-list discussion, it turns out that unary C<=>
is not slurpy as mentioned in S04.  The following patch to S04
corrects this; I've already applied the patch but thought I'd
pass it by p6l for review/comments/reactions.


Index: S04.pod
--- S04.pod     (revision 3802)
+++ S04.pod     (working copy)
@@ -12,7 +12,7 @@
   Maintainer: Larry Wall <[EMAIL PROTECTED]>
   Date: 19 Aug 2004
-  Last Modified: 29 Jan 2005
+  Last Modified: 15 Jun 2005
   Number: 4
   Version: 5
@@ -185,13 +185,10 @@
 This has the added benefit of limiting the scope of the C<$line>
 parameter to the block it's bound to.  (The C<while>'s declaration of
 C<$line> continues to be visible past the end of the block.  Remember,
-no implicit block scopes.)  It is possible to write
+no implicit block scopes.)  It is also possible to write
     while =$*IN -> $line {...}
-But it won't do what you expect, because unary C<=> does a slurp in scalar
-context, so C<$line> will contain the entire file.
 Note also that Perl 5's special rule causing
     while (<>) {...}

Reply via email to