spaze
09-17-2002, 02:54 AM
Hello!
I am writing a script that loads the contents from a file and shows all entries that are within the given search criteria.
The problem is, that it doesn't show the entries if the casing is not entered correctly.
For example, if the search keyword is 'Airplane', it will not pick up entries that are 'airplane'
Is there a way to ignore the casing? here is the code bit that searches through the file...
foreach $line (@array){
if ($line =~ /$search/){
($last,$first,$airplane,$sign,$dep,$arr,$timehrs,$timemin,$comp,$type,$ref,$desc,$weather,$entrysave d,$url)=split(/\|/,$line);
Is there a way that I could change all these entries in the memory to uppercase as well as the search keyword so that it would find all entries no matter what casing, but still would show the correct casing on the page?
Thanks for your help!
I am writing a script that loads the contents from a file and shows all entries that are within the given search criteria.
The problem is, that it doesn't show the entries if the casing is not entered correctly.
For example, if the search keyword is 'Airplane', it will not pick up entries that are 'airplane'
Is there a way to ignore the casing? here is the code bit that searches through the file...
foreach $line (@array){
if ($line =~ /$search/){
($last,$first,$airplane,$sign,$dep,$arr,$timehrs,$timemin,$comp,$type,$ref,$desc,$weather,$entrysave d,$url)=split(/\|/,$line);
Is there a way that I could change all these entries in the memory to uppercase as well as the search keyword so that it would find all entries no matter what casing, but still would show the correct casing on the page?
Thanks for your help!