in reply to Re^3: Print function
in thread Print function

Maybe you wanted $var =~ /^\s+$/. Which means ... make sure the $var contains only non-whitespace-characters and is not empty.

I think that you meant $var =~ /^\S+$/ for non-whitespace-characters?