develooper Front page | perl.perl5.porters | Postings from December 2010

Re: [perl #80306] Quoting behaviour of => is too generous

Thread Previous | Thread Next
Ed Avis
December 6, 2010 08:33
Re: [perl #80306] Quoting behaviour of => is too generous
Message ID:
Abigail <abigail <at>> writes:

>>  $ perl -MO=Deparse -wce 'my %h = ("-aa" => 1)'

>I don't know what your point with this example is.

Sorry - stupidity on my part.  Of course it is already quoted.

>>It's a bit odd for the quoting behaviour to differ like this - or at least, I
>>would expect that if => has the effect of quoting its LHS, then it should also
>>bind to it a bit more tightly.
>Sorry, no idea what you mean here.

I might expect

   12 -aa => 1

to be equivalent to

   12 - (aa => 1)

So that if => is quoting just the 'aa' part, and not '-aa', then it should
also bind to just the 'aa' part.  On the other hand, if - binds more tightly than
=>, then => should not have any special quoting effect because its LHS is not
a plain string but the seeming expression (12 - aa).

Ed Avis <>

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