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

[perl #123184] pos++

Thread Previous
Father Chrysostomos
November 11, 2014 22:01
[perl #123184] pos++
Message ID:
# New Ticket Created by  Father Chrysostomos 
# Please include the string:  [perl #123184]
# in the subject line of all future correspondence about this issue. 
# <URL: >

Yes, I actually tried to do pos++ recently, and quickly realised why it didn’t work.

But ‘pos++;’ could only mean one thing, so why shouldn’t perl do that?

Making this work for the unambiguous cases that are currently syntax errors is not that hard, and I can make it generic enough to work with custom lvalue subs, too.

The only drawback I can think of is that, while the first line here will work, the second will not, since it is not sufficiently unambiguous:

  pos++ if $necessary;


Father Chrysostomos

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