exists#
Tied-hash membership test: does a key exist in %Config?
Σύνοψη#
if (exists $Config{useithreads}) { ... }
Τι επιστρέφεται#
A true value when the key is part of the configuration (even if the recorded value is undef), false otherwise.
Παραδείγματα#
use Config;
print exists $Config{d_fork} ? "yes" : "no"; # yes
print exists $Config{nonesuch} ? "yes" : "no"; # no
print exists $Config{useithreads} ? "yes" : "no"; # yes (value is undef)
Οριακές περιπτώσεις#
Pair
EXISTSwithFETCHto distinguish «key is absent» from «key is present but undef».
Διαφορές από το upstream#
Fully compatible with upstream.