Re: Hash of Lists

2005-06-06 Thread Wijaya Edward
> 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}

Hash of Lists

2005-06-06 Thread Andrew Black
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

RE: To create a hash of lists

2002-02-22 Thread William . Crain
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

Re: To create a hash of lists

2002-02-21 Thread Jeff 'japhy' Pinyan
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}

To create a hash of lists

2002-02-21 Thread William . Crain
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')

Re: hash of lists inconsistent key lookup

2001-08-17 Thread Michael Fowler
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"; >