Guest_imported
New member
- Jan 1, 1970
- 0
Hey everyone.
I've been working with perl for awhile now, and never have I figured out how to compare a string that has been read off a file, with a non-variable string.
I put the data ripped off a file into "@INF"
if ($INF[$index] == "joe"
{
do something.
}
it seems that it's ALWAYS true, regardless whether ... it actually is or not...
using the 'ord' function, which takes the ASCII value of the character, it works.But as for strings...
It seems simple enough, but it just doesn't freaking work...
someone please help.
THANKS.
-NeX
I've been working with perl for awhile now, and never have I figured out how to compare a string that has been read off a file, with a non-variable string.
I put the data ripped off a file into "@INF"
if ($INF[$index] == "joe"
{
do something.
}
it seems that it's ALWAYS true, regardless whether ... it actually is or not...
using the 'ord' function, which takes the ASCII value of the character, it works.But as for strings...
It seems simple enough, but it just doesn't freaking work...
someone please help.
THANKS.
-NeX