http://qs321.pair.com?node_id=248269


in reply to Can this be a 1 line or simpler regex?

I think the above is fine, but if you insist on less lines:
%& = ("\t" => '\t', "\n" => '\n', "\r" => '\r', "\f" => '\f'); s/[\t\n\r\f]/$&{$&}/g;

I wouldn't call it simpler though.

Abigail