I\'ve just been using this code to check if a string is empty:
if ($str == \"\") { // ... }
And also the same with the not equals operato
To check for an empty string you could also do something as follows
if (!defined $val || $val eq '') { # empty }