mantra2006 has asked for the wisdom of the Perl Monks concerning the following question:
my @directory = ("C:\Testing"); my $srcfile; my @sourcefiles; $datfile = uc(test_file_name.dat); find(\&sourcefind, @directory); sub sourcefind { open(FL, $File::Find::name); $sourcefile = $_ if -f and /$datfile/ ; close(FL); } the program has to find successful match if the filename is following Case 1 : test_file_name.dat (all lower case) Case 2 : TEST_FILE_NAME.DAT (all upper case) Case 3 : Test_File_Name.dat (Mixed)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File::Find problem
by runrig (Abbot) on Oct 12, 2006 at 21:19 UTC | |
|
Re: File::Find problem
by blazar (Canon) on Oct 12, 2006 at 21:28 UTC | |
|
Re: File::Find problem (\)
by tye (Sage) on Oct 12, 2006 at 21:42 UTC | |
|
Re: File::Find problem
by GrandFather (Saint) on Oct 12, 2006 at 21:19 UTC | |
|
Re: File::Find problem
by caelifer (Scribe) on Oct 12, 2006 at 23:24 UTC | |
|
Re: File::Find problem
by mantra2006 (Hermit) on Oct 13, 2006 at 00:08 UTC |