alana has asked for the wisdom of the Perl Monks concerning the following question:
I was wondering if their is a cleaner way or if their is a way to tell perl internally to handle all files in a case insensitive maner? Thanks, Alanasub fileExists { my $dir = shift; my $file = shift; opendir DIR, $dir; my ($exists) = grep /$file/i, readdir DIR; closedir DIR; return $exists; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: case insensitive file operations
by wog (Curate) on Sep 19, 2001 at 23:38 UTC | |
|
Re: case insensitive file operations
by Zaxo (Archbishop) on Sep 20, 2001 at 01:26 UTC | |
|
Re: case insensitive file operations
by suaveant (Parson) on Sep 19, 2001 at 23:39 UTC | |
|
Re: case insensitive file operations
by Rhandom (Curate) on Sep 20, 2001 at 01:39 UTC |