- or download this
my $script_dir = 'C:\\temp\\\\';
print "1. $script_dir\n";
...
$script_dir =~ s{/$}{}g;
print "2. $script_dir\n";
- or download this
$script_dir =~ tr{\\}{/}s;
- or download this
$script_dir =~ s{\\+(?=(.)?)}{"/"x defined $1}ge;
- or download this
$_ = s/\\+$//r =~ s{\\+}{/}gr for $script_dir;