Questions about this topic? Sign up to ask in the talk tab.

Perl/Basics/Boolean Logic/Helper Natives/Exists

From NetSec

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The exists native applies specifically to hashes and hash references.

print "This user has an age.\n" if exists $user->{'age'};