The hash is created using a pair of curlies, and then pushed straight into our list. The hash never has a name of its own, so you can only refer to it as a member of the list, e.g.my @list; # push an anonymous hash into @list push @list, { apples => 'green', peaches => 'cream' };
$list[0]->{pears} = 'expensive';
Regards,
Jeff
In reply to Re: anonymous hash
by jaa
in thread anonymous hash
by perumal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |