in reply to Re: File::Find giving unexpected results under windows
in thread File::Find giving unexpected results under windows

I get the same results either way. Are you running under windows? find(\&process, 'F:/');

Replies are listed 'Best First'.
Re^3: File::Find giving unexpected results under windows
by Anonymous Monk on Feb 15, 2011 at 14:13 UTC
    Windows, yes.
    find( sub { print $File::Find::name, "\n"; }, 'C:');
    returns only files and directories in my home Documents dir, like
    C:My Music
    wheras with the slash I get all the contents of the C: drive, and the correspoding path looks like
    C:/Documents and Settings/micgra/My Documents/My Music

      This is not surprising, as on Windows, C: and C:/ are two different things.

      C: means "The current directory on the volume C:

      C:/ means "The root directory on the volume C:

      So, if the current directory (on the volume) is not the root directory, the two will differ.

      Windows has more than one "current directory" per application. It tracks the current directory per application per volume.