Help for this page

Select Code to Download


  1. or download this
    my $s = '\\\\10.0.0.1\\path\\to\\foo';
    print("$s\n");     # \\10.0.0.1\path\to\foo 
    $s =~ tr/\\/\//;
    print("$s\n");     # //10.0.0.1/path/to/foo
    
  2. or download this
    my $s = '\\\\10.0.0.1\\path\\to\\foo';
    print("$s\n");     # \\10.0.0.1\path\to\foo 
    $s =~ tr{\\}{/};
    print("$s\n");     # //10.0.0.1/path/to/foo