I have written the following statements to search for an item that matches spicification. The program works, but if the name of item consists of large letters it will not match. Is there a way to search the name regardless of the letter. In other words, make the search case insensitive.
Thanks for your help.
open(INF, "<item2.out") or dienice("Couldn't open auto.out for reading: $! \n");
@data = <INF>;
close (INF);
use CGI qw(param);
use CGI::Carp qw(fatalsToBrowser);
my $item1 = param("item");
my $price1 = param("price");
my $city1 = param("city");
foreach $i (@data) {
chomp($i);
($count,$name,$email,$address,$city,$state,$zipcode,$phone,$time,$pm,$item,$price,$body,$thismon,$mday,$year)=split(/\|/,$i);
if ($city1 eq $city) {
if ($item1 eq $item) {
if ($price <= $price1) {
Thanks for your help.
open(INF, "<item2.out") or dienice("Couldn't open auto.out for reading: $! \n");
@data = <INF>;
close (INF);
use CGI qw(param);
use CGI::Carp qw(fatalsToBrowser);
my $item1 = param("item");
my $price1 = param("price");
my $city1 = param("city");
foreach $i (@data) {
chomp($i);
($count,$name,$email,$address,$city,$state,$zipcode,$phone,$time,$pm,$item,$price,$body,$thismon,$mday,$year)=split(/\|/,$i);
if ($city1 eq $city) {
if ($item1 eq $item) {
if ($price <= $price1) {