develooper Front page | perl.perl5.porters | Postings from July 2014

Re: New feature proposal : <<>> to disable magic open of ARGV

Thread Previous | Thread Next
David Nicol
July 30, 2014 01:07
Re: New feature proposal : <<>> to disable magic open of ARGV
Message ID:
>> > literal construct <<>> iterate.  Awesome.  I think we're going to want a
>> > better error message, if possible, though, than:
>> >
>> >   ~/code/perl5$ ./perl -e 'while (<<ARGV>>) { print }' 'ls |'
>> >   Can't find string terminator "ARGV" anywhere before EOF at -e line 1.
>> That may be hard, as this:
>>     while (<<ARGV>>3) {print}
>>     ARGV
>> is legal syntax.
> Yeah, the error that I got made it clear that it would be tricky.  If we can't,
> we can't, but if we can, we should.  (For non-absurd-effort levels of "can".)

somewhere in this archive is a patch I submitted once to allow
whitespace between a
left-shift that begins an expression and a bareword that isn't an
infix operator (to allow
using the deprecated empty terminator, which is what that always
confusingly misparses as,
to precede C<le> for instance) and that might be a good starting place

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About