I have this in a script that searches some files of saved CGI.pm objects:

foreach my $item(@record_list){
                        
        if (open(my $FILE, "$path/$item")) {
        
$CUSTOMER = new CGI($FILE); # Throw out the old $CUSTOMER, replace it with a new one
                close $FILE;
        
                if ($CUSTOMER->param('c_name') =~ /^$customer_search_term/i) {
                
                    $match= $CUSTOMER->param('c_name');
                
                    push (@items, $match);
                
                    $counter++;
                
                    }
                
                elsif ($CUSTOMER->param('c_contact')  =~ 
/^$customer_search_term/i) {
                
                    $match= $CUSTOMER->param('c_contact');
                
                    push (@items, $match);      
                
                    $counter++;
                
                        }
                        
                }

        }

I was playing around with it and found when I enter a "*" character it matches all records. That's kind of a cool feature for the users of this script. Are there any other special characters that will affect the results?

Kindest Regards,

--
Bill


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to