> 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.
>
> Would this have an advantage in making the
>
> while( <> ) {
> }
>
> syntax less magical?
You should probably check out RFC 129. I wrote it to suggest that <>
default to $DEFIN, the new default input handle, instead of iterating
through @ARGV. I think this might implicitly solve your problem because
<> would then mean "$_ = <$DEFIN>", which is I think what you're after.
Implicit in all this is that you'd have to do something special to get
the magic effects of <> currently. Maybe explicitly referencing $ARGV
(the polymorphic filehandle, not filename*) is enough?
while (<$ARGV>) { }
Hmmmm. But then you've still got a nasty inconsistency, just rather than
being <> it's <$ARGV>.
-Nate
* filehandles and filenames are both scalars in Perl 6, supposedly. This
isn't a big problem for ARGV vs. $ARGV after all, see here:
http://www.mail-archive.com/perl6-language@perl.org/msg03279.html