in reply to How can I CORRECTLY pass strings as arguments from command line?

First, my $string1 = "-----\\---------"; doesn't actually declare a string with two backslashes (that would be "-----\\\\---------"  — remember the backslash is special in string literals (even if single quoted '-----\\---------' it doesn't produce two backslashes)).  IOW, it's a single backslash to start with in your first case...

Second, you don't want the quotes in the substitution: s/"\\"/"\"/g;.  Try

$string1 =~ s/\\\\/\\/g;