perl -e "print $ARGV[0]=~s{\$}{\\\$}r" a$dollar a\$dollar or perl -e "print $ARGV[0]=~s{([\$\@\%])}{\\\1}gr" a$dollar@rray%%hashes a\$dollar\@rray\%\%hashes
In reply to Re^2: How to replace '$' in strings
by Discipulus
in thread How to replace '$' in strings
by ravi45722
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |