in reply to Checking for blank string
In your example, it seems the value is the empty string , which is defined. undef is undefined. To check for them, use
# empty string defined $value && '' eq $value # undefined ! defined $value
Check for definedness is needed in the first case, as `undef` stringifies to the empty string.
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Checking for blank string
by Himaja (Novice) on Sep 26, 2016 at 08:28 UTC | |
by hippo (Archbishop) on Sep 26, 2016 at 08:46 UTC |