fetch#

Tied-hash read: return the value stored under a key.

Synopsis#

my $arch = $Config{archname};   # calls FETCH

What you get back#

The string value for the given key, or undef if the key is either absent or recorded as undef (for example d_pseudofork).

Examples#

use Config;
print $Config{osname};          # linux
print $Config{archname};        # x86_64-linux

Edge cases#

  • An empty string key returns undef.

  • Missing keys and keys whose recorded value is undef are indistinguishable through FETCH alone; use EXISTS to tell them apart.

Differences from upstream#

Fully compatible with upstream.