Hi guys !
A simple one. How can I convert an array of n elements to a hash with those n elements as keys? (the values are not important to me).
Second one. I have to run on the above hash as follows:
while (1) { for $key (keys(%myhash)) { if (&isPassTest()) { delete($key); } } }
like that I run on a decresing hash %myhashtill every element passes the test and the hash is empty. Will it work or removing elements while running on the hash can cause problems of some sort?
Thanks.
Edited: ~Wed Jul 24 15:26:45 2002 (GMT) by footpad: Added missing </code> tag
In reply to converting ana array to a hash by hotshot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |