I'm trying to change dbman to print a text if a field contains a certain string.
I thought this string should do it:
if ($rec{'Description'} eq /Sugar/) {print qq|
<b>Warning:<b> sugar may be sweet!
|;
}
But doesn't print anything even if Sugar is in the field (among other ingredients, the field content may look like:
Flour``Sugar``Cream``Strawberry jam``etc).
What am I doing wrong?
(btw the warning text is essential: it will warn for ingredients dangerous if handled incorrectly. the sugar line above is only a place holder)
TIA
C.
I thought this string should do it:
if ($rec{'Description'} eq /Sugar/) {print qq|
<b>Warning:<b> sugar may be sweet!
|;
}
But doesn't print anything even if Sugar is in the field (among other ingredients, the field content may look like:
Flour``Sugar``Cream``Strawberry jam``etc).
What am I doing wrong?
(btw the warning text is essential: it will warn for ingredients dangerous if handled incorrectly. the sugar line above is only a place holder)
TIA
C.