I have a very specific problem.
Does s/// work with strings that are contained in single quotes? I've been debugging and I'm trying to replace a string that contains a $ in it. If I use double quotes, it works for the string up until the $. If I use single quotes, it does not work with any string.
Here is my code; it involves file access, and file.data contains the string "testing $my string."
#!/usr/bin/perl
$s1 = "testing $my string";
$s2 = "testing $your string";
local ($^I, @ARGV) = ('.bak', 'file.data');
while (<>) {
s/$s1/$s2/g;
print;
}