in reply to case insensitive file operations

Generally, it is best to be precise about path names.

Some shells can native glob in a case-insensitive way. shopt -s nocaseglob will set that up in bash. Perl's glob is standalone and does not honor bash options. This approach using backticks will be tricky and not very portable.

A perl approach:

sub fileExists { my $dir = shift; my $file = shift; # case insensitive grep on filenames my @exists = grep { lc("$dir/$file") eq lc($_) } glob($dir/*); # returns an array, you want to know if more than one file matches }
This kind of handling is a spot case. It does not set up any global case insensitivity in perl.

After Compline,
Zaxo