[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Smartmatch with regex in list context



Hi,

$ perl -wMstrict -E "say scalar (my @a = 'aaa' =~ /./g)"
3
$ perl -wMstrict -E "say scalar (my @a = 'aaa' ~~ /./g)"
1

(from http://www.perlmonks.org/?node_id=708150 ), both with perl 5.10.0
and blead.

Is this intentional? If yes, we should add s small warning to perlsyn.
I'd prefer to have =~ and ~~ behave the same in list context.

Cheers,
Moritz


Follow-Ups from:
Aristotle Pagaltzis <pagaltzis@gmx.de>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]