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

Re: [perl #121700] Ambiguous use of -foo when it isn't ambiguous

Thread Previous
From:
ilmari
Date:
April 23, 2014 16:17
Subject:
Re: [perl #121700] Ambiguous use of -foo when it isn't ambiguous
Message ID:
d8jd2g858cn.fsf@dalvik.ping.uio.no
Eric Brine <ikegami@adaelis.com> writes:

> I copied and pasted the wrong snippet. The one I posted is indeed
> ambiguous. I meant the post the following:
>
> $ perl -Mstrict -wE'use constant FOO => 123; say 256-FOO;'
> Ambiguous use of -FOO resolved as -&FOO() at -e line 1.
> 133

Interestingly, putting a space after the - makes the warning go away.

-- 
"A disappointingly low fraction of the human race is,
 at any given time, on fire." - Stig Sandbeck Mathisen


Thread Previous


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