in reply to Search for file ignore case

File::Find allows you to specify your match criteria as Perl code, so you can do a case insensitive match for the file name you want.

File::Find::Rule allows you to specify your specify a regexp to ->name, and regexps can do case insensitive matches.

What have you tried?

Replies are listed 'Best First'.
Re^2: Search for file ignore case
by Noame (Beadle) on May 18, 2008 at 19:40 UTC

    I've the file name ( get it from some function), an example: TeSt.Mak

    The file is existing under the directory (e.g: test.mak), but can appear with the same name but mixed case.
    I need to retrieve the correct file name as it appears under the directory.

      In Windows, you can use GetLongPathName in Win32.

      >copy nul test.mak 1 file(s) copied. >perl -le"use Win32; print Win32::GetLongPathName('TeSt.Mak');" test.mak
        i need it for unix :-(