Help for this page

Select Code to Download


  1. or download this
    $_ = my $original = "/one/two///three/four/..//fourX/five////six/seven
    +";
    
    ...
    $_ = join( "/", @outpaths );
    
    print "2: $original -> $_\n";
    
  2. or download this
        pop @outpaths or die "Bad path: $original\n";
    
  3. or download this
    my @outpath = ();
    for my $p ( split m!/+!, $original ) {
    ...
        }
    }
    my $goodpath = join "/", @outpath;