in reply to Re: Chaining string ops
in thread Chaining string ops

Using splice is easier than doing it with for(;;).
sub ChainSubs{ local $_ = shift; while(@_) { my ($s, $t) = splice @_, 0, 2; s/$s/$t/g; } return $_; }

Makeshifts last the longest.