http://www.perlmonks.org?node_id=1039614


in reply to Smart matching is experimental/depreciated in 5.18 - recommendations?

What I would do, frankly, is to replace that code with something else, and not use that “sugary” feature again.   Probably, I would simply use a if..elsif..else chain.   Another technique is to set up a hash-table containing code references to handler subroutines, if you really needed to.   I have shunned the use of the feature because it really does not add semantic meaning to the language, and now, to hear that it is “subject to big changes or maybe even going away,” I would feel justified in that cautious decision.   (Gee, that didn’t last long.)   Long-term maintainable code should be averse to the blowing wind of passing fancies.