for my $num (@a) { push @hashes,{} }
Reads: For each element in the array @a, create a reference to an empty hash and store it in the array @hashes
It could be written more compact as in:
push @hashes,{} for (@a);or
$hashes[$_-1]={} for (@a);
Hope this helps!
citromatik
In reply to Re^3: create hash names dynamically
by citromatik
in thread create hash names dynamically
by phemal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |