daveinOK2004
MIS
Here's what I'm trying to do:
This works, but is case sensitive. I'd like to make it non-case sensitive. I found the use of a regex /exp/i is supposed to make case insensitive. I don't know if I'm doing it wrong, but it doesn't work when I do it.
I tried if (/$compcn/i eq $cn) as well as if ($compcn eq /$cn/i) with no success.
Code:
my @skipcn = ('KAbel', 'PAbell', 'tabney', 'TYost');
foreach my $compcn (@skipcn)
{
if ($compcn eq $cn)
{
print $compcn;
}
}
This works, but is case sensitive. I'd like to make it non-case sensitive. I found the use of a regex /exp/i is supposed to make case insensitive. I don't know if I'm doing it wrong, but it doesn't work when I do it.
I tried if (/$compcn/i eq $cn) as well as if ($compcn eq /$cn/i) with no success.