To check if string is empty (with multiple spaces)
my $product =" ";
if(defined($product) && $product!~( /^\s*$/ )){
print ("This is Not a balnk product");
}else{
print ("This is a balnk product");
}
Subscribe to:
Post Comments (Atom)
Thoughts, comments, opinions of 20-something working in IT striving to be a house-proud homemaker
No comments:
Post a Comment