> Specifically
> # append new members to an existing family
> push @{ $HoL{"flintstones"} }, "wilma", "betty";
>
> I don't understand why the construct @{ x } is written that way.
Step by step, what it does is:
1. Dereference the List in the Hash with key "flinstones" ---> @{$array_ref}
I am trying to set up a Hash of Lists and am following the example
http://www.perl.com/doc/manual/html/pod/perldsc.html#HASHES_OF_LISTS
Specifically
# append new members to an existing family
push @{ $HoL{"flintstones"} }, "wilma", "betty";
I don't understa
Thanks for the quick and excellent response. I quoted your answer for the
benefit of others. Perl's syntax to work with references is giving me a few
"growing pains" I suppose, though I'm not opposed to working with it once I
get it through my head what is required to make Perl understand what
On Feb 21, [EMAIL PROTECTED] said:
>Using the following code, I want to create a hash or individual lists. Of
>course, this code doesn't work
>
>What do I need to change to correct my error?
push() requires an array. $foo{bar} is a scalar. @{ $foo{bar} } is an
array.
>push($printQueue{A}
Using the following code, I want to create a hash or individual lists. Of
course, this code doesn't work
What do I need to change to correct my error?
--- Code follows ---
#!/perl/bin/perl
use strict;
my %printQueue;
push($printQueue{A}, 'This is the first line in A')
I've changed the subject of this thread. In the future, please post
messages with a relevant subject line.
On Fri, Aug 17, 2001 at 12:53:22PM -0600, Tyler Cruickshank wrote:
> %browns = ();
>
> for($i=1; $i<=3; $i++){
>
>$hour = "hr$i";
>$root = 'data.';
>$name = "$root$hour";
>