Having a string that has the backslash escaped i.e.
$string =~ s/\\/\/g;
You need four backslashes as the backslash itself needs to be escaped as well:
$string =~ s/\\\\/\\/g
See a demo on regex101.com.
my $string = 'this is a double backslash: \\\\';
print $string . "\n";
$string =~ s/\\\\/\\/g;
See the demo on ideone.com.