in reply to how do I use s///e

You can test which of a set of alternatives match, as I did in this example.

The PerlMonk tr/// Advocate