Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: change all occurances of string1 into string2

by tobyink (Abbot)
on Nov 29, 2012 at 16:10 UTC ( #1006286=note: print w/replies, xml ) Need Help??


in reply to Re: change all occurances of string1 into string2
in thread change all occurances of string1 into string2

my $re = join '|', map quotemeta, keys %translate;
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'