Help for this page

Select Code to Download


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