I'm trying to do something if I match a string to part of a string
$cdsowned = "ABD001,ABD002,ABD003,ABD004,ABD005,ABD006,ABD007,ABL1A";
and
$row[0] = "ABD003";
I've got this code but it doesn't work for some reason
if ($cdsowned =~ m/"$row[0]"/i) {
DO THIS
}
Also, how would I make it match say ABD003 but not ABD0033?
would it just be this?
if ($cdsowned =~ m/",$row[0],"/i) {
DO THIS
}
Can anyone help?
$cdsowned = "ABD001,ABD002,ABD003,ABD004,ABD005,ABD006,ABD007,ABL1A";
and
$row[0] = "ABD003";
I've got this code but it doesn't work for some reason
if ($cdsowned =~ m/"$row[0]"/i) {
DO THIS
}
Also, how would I make it match say ABD003 but not ABD0033?
would it just be this?
if ($cdsowned =~ m/",$row[0],"/i) {
DO THIS
}
Can anyone help?