Trying to check data entry to make sure something was entered. If something is entered then continue processing. So I want to use a regular expression that checks if there is NO Blank entries and if so then process:
This is not working:
!^\s*$
Re: Check for non blank entry
/\S/
(capital S) will check for the presence of non-whitespace.
Caution: Contents may have been coded under pressure.
Re: Check for non blank entry
!~ /^\s*$/
or
=~ /\S/
Re: Check for non blank entry
If nothing was entered, your $value might be undefined so better to do (defined $value and $value =~ /\S/).