The code as you posted it doesn't make much sense even if interpreted sloppily. Do you want to replace single backslashes with a sequence of four backslashes? Even when posting pseudocode like this it would be nice to adhere to Perl's syntax if it is not an overkill. Here quoting the strigs would have been nice.
Wild guess: you may be interested to know that slashes work just fine even under Windows in Perl, and that there are various reasons why should do so anyway...