Code: ( text )
#!/usr/bin/perl -w
use strict;
# replacing double back slash...
my $string1 = "-----\\---------";
$string1 =~ s/"\\"/"\"/g;
print "The resulting value is : $string1 \n";
####
Code: ( text ) C:\>
C:\>test_string_replace21.pl
The resulting value is : -----\---------
####
Code: ( text )
#!/usr/bin/perl -w
use strict;
my $string1 = $ARGV[0];
$string1 =~ s/"\\"/"\"/g;
print "The resulting value is : $string1 \n";
####
Code: ( text )
C:\>test_string_replace2.pl "-----\\-----"
The resulting value is : -----\\-----