Help for this page

Select Code to Download


  1. or download this
    my ($vol, $dirs) = File::Spec->splitpath($path, 1);
    $dirs = File::Spec->canonpath($dirs);
    ...
    pop(@dirs);
    $dirs = File::Spec->catdir(@dirs);
    $path = File::Spec->catpath($vol, $dirs, '');
    
  2. or download this
    use strict;
    use warnings;
    ...
    
       print("  -> $path\n");
    }
    
  3. or download this
    /rootdir/sub1/sub2/sub3/sub4/
      -> \rootdir\sub1\sub2\sub3
    ...
      ->
    reldir
      ->
    
  4. or download this
    my ($vol, $dirs) = File::Spec->splitpath($path, 0);
    $dirs = File::Spec->canonpath($dirs);
    ...
    pop(@dirs);
    $dirs = File::Spec->catdir(@dirs);
    $path = File::Spec->catpath($vol, $dirs, '');
    
  5. or download this
    use strict;
    use warnings;
    ...
    
       print("  -> $path\n");
    }
    
  6. or download this
    /rootdir/sub1/sub2/sub3/sub4/
      -> \rootdir\sub1\sub2\sub3
    ...
      ->
    relfile
      ->