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


in reply to Best way to print variables in regex

I have posted a reply to your other question which may help here as well (update: ignore this - Kenosis solution above is far more elegant).