in reply to Re^2: File::Path::rmtree on UNC path (updated)
in thread File::Path::rmtree on UNC path (updated)

what if you chdir to the directory above that?
my ($dir, $subdir) = $sharedir =~ /^(.*)\/(.*)$/; chdir $dir; rmtree $subdir;

Replies are listed 'Best First'.
Re^4: File::Path::rmtree on UNC path (updated)
by rovf (Priest) on Jun 10, 2009 at 11:40 UTC
    my ($dir, $subdir) = $sharedir =~ /^(.*)\/(.*)$/; chdir $dir;

    Actually, I would write this as

    $chdir "$subdir\\..";
    (should be no peril in this context, isn't it?), but, yes, you are right, this seems to work well!! Great idea!

    -- 
    Ronald Fischer <ynnor@mm.st>