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


in reply to Re^2: Comapring two values of a scalar
in thread Comapring two values of a scalar

Regexp::Common

While nice and general, this seems a bit heavy for the OP, especially considering the the rather regular examples given. Of course, always nice to see an example of a more general/powerful solution.