in reply to Array of hashes of arrays

Here's an example of creating a data structure similiar to what you're talking about, and popping and pushing elements into it.

I also tend to prefer the arrow notation, rather than the implicit mode. I believe the arrow notation makes it more clear. But that may be my 'C' background talking.

Update: Looks like I was too slow. Oh well.
#!/usr/local/bin/perl -w use strict; use Data::Dumper; { my @arr = ({-a => [qw(a1 a2 a3)]}, {-b => [qw(b1 b2 b3)]}, {-c => [ +qw(c1 c2 c3)]}); print "Dumping initial data structure -->\n"; print Dumper ([\@arr]), "\n"; print "Displaying elements of @arr [1]->{-b} -->\n"; print "$_\n" foreach (@{$arr [1]->{-b}}); print "\n"; pop (@{$arr [2]->{-c}}); print "Dumping data structure with @arr[2]->{-c} popped (no c3) --> +\n"; print Dumper ([\@arr]); push @{$arr [0]->{-a}}, "a4"; print "Dumping data structure with a4 added to @arr[0]->{-a} -->\n" +; print Dumper ([\@arr]); }
--Chris

e-mail jcwren