I'm using Perl 5.24 right now and smartmatch is a great, versatile operator, for example,
%foobar ~~ @foo;
and all the intricacies therein.
I understand from 5.27 onwards its functionality will be reduced to smartwatches involving,
$foo = qr/foo/;
Okay so I'm going to have to rewrite my data pipelines to be compliant.
My question is, if confirmed what is the different between,
'foo' ~~ $foo;
and,
'foo' =~ /$foo/;
It strikes me that smartmatch is being removed in all but name. Am I right, and if not what am I missing?
History
It has an unusual history, and it must be stressed its classed as experimental. I'm charting what I know. I guess many of you will know more, any input would be helpful because its an example (to students) of language evolution:
- 5.10 first introduced
- 5.14 introduced %foobar ~~ @foo type matches
- 5.27 Removed in all but name only? Still experimental?