Journal of a Girl in IT
Thoughts, comments, opinions of 20-something working in IT striving to be a house-proud homemaker
Friday, March 25, 2011
Perl check for empty string
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");
}
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment