LawnBoy
MIS
- Mar 12, 2003
- 2,881
Terrible subject title, not sure what to call my problem...
I'm constructing a search function. Works great so far, but I want to make it case-insensitive. What I've got is along the lines of
According to the docs on File::Find::Rule, "name" can be a regex, and I know I can make a regex case-insensitive using the /i operator. I just have no clue how to express $Pattern->Text as a regex, and guessing in the dark isn't helping.
Can somebody buy me a clue?
Thanks.
I'm constructing a search function. Works great so far, but I want to make it case-insensitive. What I've got is along the lines of
Code:
use Win32::GUI;
use File::Find::Rule;
# $main is the handle to my primary window
my $Pattern = $main->AddTextfield(
-height => 20,
-width => 100,
-text => "*",
);
my $found_files = find(
name => ($Pattern->Text),
maxdepth => "$depth",
exec => \&GotMatch,
in => ($searchdir),
);
Can somebody buy me a clue?
Thanks.