in reply to Working with an Array of Array Names

Fist of all, I am not sure exactly what you are trying to do, so here is an answer with my best guess at what you are wanting to achieve.

You really need to read perlref. If you are using a *NIX server, from the command line type;

perldoc perlref

And study away. Now to my "solution";

#!/usr/bin/env perl use strict; use warnings; use Data::Dumper; my $arr; push @{$arr->{car}}, ( 4,3,2,1 ); print Dumper $arr;

Some explaination; The $arr->{car} is a reference to a hash where the key is the string "car". The @{ } says to treat the value of the hash as an array. And you know what push does. perlref will be explain it completely.

Replies are listed 'Best First'.
Re^2: Working with an Array of Array Names
by idiotek (Initiate) on Oct 07, 2007 at 23:59 UTC
    Thanks a lot guys, and thanks for the reading material. Like I said, I'm a complete scripting noob, but I've somehow managed to get a lot done by goggling and reading through some stuff on this and other forum. From what I've seen so far, there's a lot of shorthand, and too much I don't yet know. Thanks for your help.