You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
436 B
Perl

#!/usr/bin/perl
use strict;
use warnings;
use Hash::Util qw(lock_keys unlock_keys lock_hash unlock_hash lock_value unlock_value);
my %hash1=(one =>'first', two=>'second', three=>'third');
lock_keys(%hash1);
unlock_keys(%hash1);
my %hash2;
lock_keys(%hash2,'one','two','six');
lock_value(%hash2,'one');
lock_value(%hash2,'two');
unlock_value(%hash2,'two');