Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

which Cwd realpath/abs_path ... is supposed to be case preserving on win32?

use Path::Tiny qw/ path /; print path( 'C:/WIndowS/sySTEm32/ADvapI32.dll' )->realpath, "\n" __END__ C:/WIndowS/sySTEm32/ADvapI32.dll
realpath just calls Cwd::realpath which is Cwd::abs_path which is something sometimes ...

which one of the Cwd what/which is supposed to be case-preserving on case insensitive filenames like on win32?

  • Comment on which Cwd realpath/abs_path ... is supposed to be case preserving on win32?
  • Download Code

Replies are listed 'Best First'.
Re: which Cwd realpath/abs_path ... is supposed to be case preserving on win32?
by syphilis (Archbishop) on Apr 14, 2014 at 05:51 UTC
    Hi,

    If you want case-preserved name, you can use Win32::GetLongPathName()

    HTH

    Cheers,
    Rob