in reply to Re: Best Way to Search and Delete files on a large Windows Filesystem
in thread Best Way to Search and Delete files on a large Windows Filesystem

I use File::Spec->canonpath($File::Find::name) to get cleaned up paths on Win32. Note that Cygwin and ActiveState handle paths a little bit differently. I generally prefer the way ActiveState does it.
  • Comment on Re: Re: Best Way to Search and Delete files on a large Windows Filesystem

Replies are listed 'Best First'.
Re: Re: Re: Best Way to Search and Delete files on a large Windows Filesystem
by demerphq (Chancellor) on Mar 08, 2002 at 18:11 UTC
    Yeah ive done the same thing, although I generally use regexes if the output is from File::Find. But my point was that using the path as returned is fine and that taking advantage of the backslash change can be quite useful. For instance for creating a HOH of the directory structure. You can just do something like
    my($root,$path)=$funnyspec=~m!([^/]+)([^\]+)!; my @parts=split('/',$path);
    (well YKWIM)

    Anyway, I have to admit that I almost never use my cygwin version of Perl.

    Yves / DeMerphq
    --
    When to use Prototypes?
    Advanced Sorting - GRT - Guttman Rosler Transform