"." needs to be escaped in regular expressions. Use s/\.{2}/,/g or s/[.]{2}/,/g. The former uses an escaped ".", the latter a character class containing only the "."
Alexander
Updated: First variant should be s/\.{2}/,/g, not s/\.{2}//,/g. Thanks to AnomalousMonk for spotting this bug.
In reply to Re: Replace ".." with ","
by afoken
in thread [solved] Replace ".." with ","
by zaqwsxcde
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |