in reply to Re: Compare all array values without a loop
in thread Compare all array values without a loop
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 Section
Seekers of Perl Wisdom