Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if statements returning true at wrong time

Status
Not open for further replies.

Horrid

Programmer
May 20, 1999
373
I have a problem with Perl incorrectly matching on an if statement. The match is for character A with character B where character B resolves to key code 1 (looks like ""). Works fine if character B is any normal character, but I always get true returned when checking for characters like "".
Any trick to getting Perl to know that A does not = ""?

Thanks
 
just worked it out, very new to Perl and forgot that to check strings you need to do X eq Y not X == Y, works perfectly after that.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top