I have a perl script that goes to write to a file based on whether a string contains A, B, C, or D.
The string are populated from a read in file and all letters are absolutely contained in the file and being read.
Such as this:
My problem is that whichever condition is last will be written to the file. (In this case D) If I changed the last condition to A then I would only see A's in the output.
Is there something wrong with my conditional statement?
The string are populated from a read in file and all letters are absolutely contained in the file and being read.
Such as this:
Code:
if (($myString eq "A") || ($myString eq "B") || ($myString eq "C") || ($myString eq "D")) { print OUTFILE "print some stuff"; }
Is there something wrong with my conditional statement?
Comment