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

are lexical subs supposed to override keywords?

Thread Next
From:
Dave Mitchell
Date:
November 14, 2016 09:30
Subject:
are lexical subs supposed to override keywords?
Message ID:
20161114092954.GD24916@iabyn.com
It surprised me that perl keywords are overridden by lexical sub names.
Is this intentional? I couldn't find anything in perlsub about it.

    my sub for { print "in lex sub (@_) \n" }
    for (1,2);
    
outputs

    in lex sub (1 2)



-- 
This email is confidential, and now that you have read it you are legally
obliged to shoot yourself. Or shoot a lawyer, if you prefer. If you have
received this email in error, place it in its original wrapping and return
for a full refund. By opening this email, you accept that Elvis lives.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About