in reply to Re^2: Regex perl grep usage string match comparison
in thread Regex perl grep usage string match comparison
Yes, change:
if ($inputline[6] =~ $configitem) {
to:
if ($inputline[6] =~ /$configitem/i) {
and then, if $configitem contains “exception”, the line will match “exception”, “MessageException”, “Message.Exception”, etc.
But why are you still making things harder on yourself by losing the benefits of putting:
use strict;
at the head of your code? Please read Use strict and warnings, then chant The strictures, according to Seuss. :-)
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|