in reply to Re Replacing duplicate string
in thread Replacing duplicate string

A minor note regarding modifying the $/ variable. While it is useful for slurping a file, it is best done with local inside a code block to minimize any possible problems later on in the script. e.g.,
{ local undef $/; while (<MYINPUTFILE>) { ... } }
That way the changes are limited to that block only. Very useful when messing with the special variables.
-----
"Ask not what you can do for your country. Ask what's for lunch."
-- Orson Welles