js1 has asked for the wisdom of the Perl Monks concerning the following question:
Greetings Monks,
I have a problem with a hash of arrays. Here's my code:
tie %recipientqids, 'MLDBM', "/home/u752359/recipientqids.db", O_CREAT +|O_RDWR, 0640 or die $!; .. .. push(@{$recipientqids{$hostqid}},$recipient); .. .. foreach $recipient (@{$recipientqids{$hostqid}}){ print STDERR "\nrecip= $recipient"; }
If I tie the hash it doesn't print anything, but if I don't tie it, it does print out. Do I need to change my syntax if I tie the hash?
Thanks for any help.
JS.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: hash of arrays syntax
by Zaxo (Archbishop) on Jan 15, 2004 at 10:57 UTC | |
by js1 (Monk) on Jan 15, 2004 at 12:39 UTC |