http://www.perlmonks.org?node_id=646054


in reply to check for directory no mather what case (linux)

Just switch to an OS that has a non-case sensitive file system.

Seriously though, you've got the idea, just look up the readdir function (perldoc -f readdir might work for you or try readdir) and you'll have what you need.

non-Perl: Andy Ford