http://qs1969.pair.com?node_id=11117732


in reply to Some odd ambiguity in this regex

I'm trying to count digits in a scalar

Perhaps you could use tr///, see Quote Like Operators.

johngg@shiraz:~/perl/Monks$ perl -E '$_ = q{1223w3433.45+34}; say tr{0 +-9}{};' 12

I hope this is of interest.

Cheers,

JohnGG