I'm having a problem with conditionals. When the value is numeric, it works but as text characters it does not:
Neither of these work:
[tt]if ($_->[9] eq 'SP'){
print "Some text";
}[/tt]
[tt]if ($_->[9] eq "SP"
{
print "Some text";
}[/tt]
but this does:
[tt]if ($_->[9] == 1000){
print "Some text";
}[/tt]
This code is within a similar conditional statement that is always numeric. Are there issues with trying to use a text character conditional within a numeric one? Am I doing something else wrong? (Of course, I changed the matching field value in the flatfile database to test each of these.)
Don
don@ctagroup.org
Experienced in HTML, Perl, VBScript, PWS, IIS and Apache. Run OS/2 Warp 4, BeOS v5 and Windows NT (only when I have to!)
Neither of these work:
[tt]if ($_->[9] eq 'SP'){
print "Some text";
}[/tt]
[tt]if ($_->[9] eq "SP"

print "Some text";
}[/tt]
but this does:
[tt]if ($_->[9] == 1000){
print "Some text";
}[/tt]
This code is within a similar conditional statement that is always numeric. Are there issues with trying to use a text character conditional within a numeric one? Am I doing something else wrong? (Of course, I changed the matching field value in the flatfile database to test each of these.)
Don
don@ctagroup.org
Experienced in HTML, Perl, VBScript, PWS, IIS and Apache. Run OS/2 Warp 4, BeOS v5 and Windows NT (only when I have to!)