in reply to What is the best way to determine if a string is blank?
If you also want to flag strings that contain only whitespace, a regex is appropriate: $foo =~ /^\s*$/ or $foo !~ /\S/.
(In any solution, you may want to test with defined() first to avoid uninitialized value warnings.)
|
|---|