# New Ticket Created by  "brian d foy" 
# Please include the string:  [perl #130184]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=130184 >


Adapted from the Stackoverflow answer at:
http://stackoverflow.com/a/40824226/2766176

I'm using moar (2016.10) on macosx (10.10.5) darwin (14.5.0) (These
variables are quite nice!)

This came out of a problem I had with set membership. It turns out
that the way you make the set matters, and the way you make the
candidate member matters. In my case, there's a bug with angle-bracket
word quoting.

I used the [angle-brackets form of the quote
words](https://docs.perl6.org/language/quoting#Word_quoting:_qw). The
quote words form is supposed to be equivalent to the quoting version
(that is, True under `eqv`). Here's the doc example:

    <a b c> eqv ('a', 'b', 'c')

But, when I try this with a word that is all digits, this is not equivalent:

$ perl6
> < a b 137 > eqv ( 'a', 'b', '137' )
False

But, the other forms of word quoting are!

> qw/ a b 137 / eqv ( 'a', 'b', '137' )
True
> Q:w/ a b 137 / eqv ( 'a', 'b', '137' )
True

The angle-bracket word quoting uses
[IntStr](https://docs.perl6.org/type/IntStr):

> my @n = < a b 137 >
[a b 137]
> @n.perl
["a", "b", IntStr.new(137, "137")]

Without the word quoting, the digits word comes out as [Str]:

> ( 'a', 'b', '137' ).perl
("a", "b", "137")
> ( 'a', 'b', '137' )[*-1].perl
"137"
> ( 'a', 'b', '137' )[*-1].WHAT
(Str)
> my @n = ( 'a', 'b', '137' );
[a b 137]
> @n[*-1].WHAT
(Str)

Reply via email to