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.