in reply to How to replace '$' in strings
$string =~ s/\$/\\\$/g;
The replacement behaves like qq: \\ becomes \, and the dollar sing needs to be backslashed, too, to prevent the interpretation of $/.
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to replace '$' in strings
by Discipulus (Canon) on Dec 14, 2015 at 10:22 UTC | |
by Athanasius (Archbishop) on Dec 14, 2015 at 13:18 UTC | |
by soonix (Chancellor) on Dec 15, 2015 at 09:33 UTC |