C:\>perl -pe"if($_eq'baz-123'){print'bar=2'}" old > new String found where operator expected at -e line 1, near "123'){print'" (Missing operator before '){print'?) Bareword found where operator expected at -e line 1, near "'){print'bar" (Missing operator before bar?) String found where operator expected at -e line 1, at end of line (Missing semicolon on previous line?) syntax error at -e line 1, near "123'){print'" Can't find string terminator "'" anywhere before EOF at -e line 1.