Trying to dynamically create arrays, getting can't use string as ARRAY ref

2007-08-23 Thread Justin The Cynical
Greets. I have a 'config file' that contains a group name (alphanumeric) and machine name/numbers separated by whitespace. Each group is on it's own line. The file looks like this: prod01 456 345 234 prod02 789 517 325 ...etc, etc, etc... What I am attempting to do is: Put the file contents in

Re: Trying to dynamically create arrays, getting can't use string as ARRAY ref

2007-08-24 Thread Justin The Cynical
On Aug 23, 2:00 am, [EMAIL PROTECTED] (Lists User) wrote: *snip* > my %grouplist; > open HD,'groups.txt' or die $!; > > while() { > chomp; > my @tmp = split; > my $groupname = shift @tmp; > $grouplist{$groupname} = [EMAIL PROTECTED];} > > close HD; OK, thanks! The Llama presents

Re: Trying to dynamically create arrays, getting can't use string as ARRAY ref

2007-08-24 Thread Justin The Cynical
On Aug 23, 3:42 am, [EMAIL PROTECTED] (Paul Lalli) wrote: > On Aug 23, 2:00 am, [EMAIL PROTECTED] (Justin The Cynical) wrote: *snip* > > Can't use string ("prod01") as an ARRAY ref while "strict refs" in use > > perldoc -q "variable name"

Re: Trying to dynamically create arrays, getting can't use string as ARRAY ref

2007-08-26 Thread Justin The Cynical
On Aug 24, 9:11 am, [EMAIL PROTECTED] (Randal L. Schwartz) wrote: > >>>>> "Justin" == Justin The Cynical <[EMAIL PROTECTED]> writes: > > Justin> The Llama presents hashes as single value to a key, so I never thought > Justin> to make a hash of arra

Re: Trying to dynamically create arrays, getting can't use string as ARRAY ref

2007-08-29 Thread Justin The Cynical
Ok, I think I more or less have it. The true grocking of the hash, well, that I think will come in time with reading and experience. Thank you all for the help and pointers! Justin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.per