in reply to converting ana array to a hash
How can I convert an array of n elements to a hash with those n elements as keys?Like so
my @array = qw( foo bar baz quux ); my %hash = map { $_ => 1 } @array;
Will it work or removing elements while running on the hash can cause problems of some sort?You need to change
todelete($key);
And assuming isPassTest() is performing the tests correctly it should work fine, although you will need to exit the loop at some point e.g last if 0 == keys %myhash;delete($myhash{$key});
_________
broquaint
|
|---|