On 13 Sep 2000, Perl6 RFC Librarian wrote:

> An inconsistency between "C<print>" and "<>" bugs me:  "C<print;>" means
> "C<print $_;>" so it seems like "<>" should mean "C<$_ = > <>".
> I can't yet think of code that this extension would break.

Minor formatting nit: modern pod parsers accept not only C<> but also
C<<>>, C<<<>>>, etc. allowing for nested < and >, as long as the number of
adjacent < is less than the number used in the bracket. This also ignores
leading and trailing whitespace, AFAIK. So you could re-write this
paragraph as:

An inconsistency between "C<print>" and "C<< <> >>" bugs me: "C<print;>"
means "C<print $_;>", so it seems that "C<< <> >>" should mean "C<< $_ =
<> >>". I can't yet think of code that this extension would break.

And by the way, this would break code that uses <>; to discard a line of
input but wishes to preserve $_. (For example: print "Press Enter to
continue\n"; <STDIN>; print "Continuing to operate on '$_'\n";)

Cheers,
Philip
-- 
Philip Newton <[EMAIL PROTECTED]>

Reply via email to