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


in reply to look-behind regex

s/(toto)|foo/${[$1,'bar']}[!$1]/