s/_/\_/g
s/_/\_/g does nothing. You probably want s/_/\\_/g
>perl -wMstrict -le "$_ = 'a_b__c___'; print qq{before: '$_'}; ;; s/_/\_/g; print qq{after: '$_'}; " before: 'a_b__c___' after: 'a_b__c___'
But please allow me to add my voice to the chorus imploring you to Just Use Placeholders!.
In reply to Re^3: Escaping %params
by AnomalousMonk
in thread Escaping %params
by DaisyLou
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |