$delimiter = 'Y'; $_ = q(this has $100 worth of salt in it) ; warn $_; s/([\x0024])/$delimiter/gm; warn $_; s/([\x24])/$delimiter/gm; warn $_;