12345678
use strict;use Hash::Util qw(lock_keys);my $hash = { uhu1 => 1 };lock_keys(%$hash);$hash->{uhu2} = 0;^ZAttempt to access disallowed key 'uhu2' in a restricted hash at - line 6.