RosettaCodeData/Task/Empty-string/Perl/empty-string-1.pl
2023-07-01 13:44:08 -04:00

6 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";
}