Instead of
you can use@array = ('A','B','C','D'); for (@array) { $hash{$_} = undef; }
my @array = qw/A B C D/; my %hash; @hash{@array} = ();
In reply to Re^2: Compare all array values without a loop
by Crian
in thread Compare all array values without a loop
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |