
xdaveg at gmail
Nov 22, 2009, 4:11 PM
Post #2 of 4
(303 views)
Permalink
|
On Sun, Nov 22, 2009 at 6:58 PM, Eric Brine <ikegami [at] adaelis> wrote: >>perl -E"my @a = qw( 10 20 30 ); say @a ~~ 3 ? 'match' : 'no match'" > match > > That's what people seem to expect from reading the docs, so you could even > say the current behaviour is buggy. I can write the patch if you're ok with > the change. If not, the docs need clarification. I'm not really sure how useful @a ~~ $b is, but the docs from the table on smart matching are clear: " Any Num numeric equality $a == $b" Thus, @a ~~ $b should be like @a == $b. That seems to support your proposed change. However, I would suggest adding an explicit "Array Num" case to perlsyn for clarity. -- David
|