RosettaCodeData/Task/Empty-string/Perl/empty-string-1.pl

7 lines
160 B
Perl

if ($s eq "") { # Test for empty string
print "The string is empty";
}
if ($s ne "") { # Test for non empty string
print "The string is not empty";
}