in reply to Text not being replaced in file via Windows CLI ...

Works fine for me:

$ cat > foo.tmp gary is the best frank is the worst $ perl -i.bak -p -e 's/gary/harry/g;' foo.tmp $ cat foo.tmp harry is the best frank is the worst

Bear in mind that by default regular expressions are Case-Sensitive.

Caveat: I'm using neither Activestate nor Windows.

To find out about the switches like -p and -e see perlrun. For regular expressions, try perlre. To get started in general try perlintro. Welcome to the wonderful world of Perl!