RE: Printing a hash of hashes of arrays

2009-08-28 Thread Wagner, David --- Senior Programmer Analyst --- CFS
> -Original Message- > From: Ian [mailto:pcs...@gmail.com] > Sent: Thursday, August 27, 2009 11:43 > To: beginners@perl.org > Subject: Printing a hash of hashes of arrays > > Pure beginners question. > > I'm creating a hash of arrays like this : > > $ihash{$3}{$1} = [...@itab]; > > For

Re: Printing a hash of hashes of arrays

2009-08-27 Thread Ian
Thank you David, Jim, Uri.

Re: Printing a hash of hashes of arrays

2009-08-27 Thread Uri Guttman
> "I" == Ian writes: I> Pure beginners question. I> I'm creating a hash of arrays like this : I> $ihash{$3}{$1} = [...@itab]; I> For now I was able to get the data using Dumper but I need to create a I> "pretty" report. I> How do I loop over this hash/hash of arrays to print i

Re: Printing a hash of hashes of arrays

2009-08-27 Thread Jim Gibson
On 8/27/09 Thu Aug 27, 2009 10:42 AM, "Ian" scribbled: > Pure beginners question. > > I'm creating a hash of arrays like this : > > $ihash{$3}{$1} = [...@itab]; > > For now I was able to get the data using Dumper but I need to create a > "pretty" report. > > How do I loop over this hash/has

Re: Printing A Hash of Hashes

2002-09-30 Thread Ken Hammer
Mark Anderson wrote: > > Why are you wrapping these in arrays? If you used: > $tablename{$table} -> {con_name} = $constraint_name; > $tablename{$table} -> {con_type} = $type; > $tablename{$table} -> {rem_con_name} = $r_constraint_name; > $tablename{$table} -> {created_by} = $generated;

Re: Printing A Hash of Hashes

2002-09-30 Thread James Edward Gray II
In your adding lines you add entries line [ $entry ], which means, make an array reference (the brackets) which has $entry as the first element of the array. You then have a hash of hashes of arrays (for at least some entries). If you meant the arrays, you'll have to add a third loop to the

RE: Printing A Hash of Hashes

2002-09-30 Thread Mark Anderson
> This is from Chapter 9, page 281 slighly >changed to reflect my values: > >for $table ( keys %tablename) { >print "Table Name: $table \n"; > >for $items ( keys %{ $tablename{$table} } ) { >print "\t$items=$tablename{$table}{$items}\n "; > >} > >print "\n"; That looks re