See also Hash::Util which is in perl core since 5.8.0
use Hash::Util qw( lock_keys ); my %hash = (foo => 42, bar => 23); lock_keys(%hash); say $hash{bae}; # Boom! "Attempt to access disallowed key 'bae' in a + restricted hash..."
Good Day,
Dean
In reply to Re^2: Benifits of using hash rather than number of variables?
by duelafn
in thread Benifits of using hash rather than number of variables?
by tart
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |