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

One thing came to mind: find(\&process, 'F:') and find(\&process, 'F:/') gives very different results (at least for me). Not sure, but I think it might relate to your problem.

Replies are listed 'Best First'.
Re^2: File::Find giving unexpected results under windows
by Joel (Novice) on Feb 15, 2011 at 13:31 UTC
    I get the same results either way. Are you running under windows? find(\&process, 'F:/');
      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.