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


in reply to Re^2: Oneliner with substring trimming and padding
in thread Oneliner with substring trimming and padding

It's not documented in perlre because perlre is ridiculously pedantic. The /e doesn't modify the regular expression; it modifies the replacement text.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'