Thanks guys, that makes sense to a degree. I'm not sure why it changes to array refs though. Here is my code where I am assigning what is in the list.
open(ENVIRONMENTS, "environments.txt");
while(<ENVIRONMENTS>){
my $line = $_;
chomp($line);
push @{$Envs->{data}}, [$line];
| [reply] [d/l] |
The square brackets around $line put it into an array ref before pushing it onto @{$Envs->{data}}. Drop them, and it'll work the way you want:
push @{$Envs->{data}}, $line;
| [reply] [d/l] |
Okay, I figured out where my problem is. here it is.
push @{$EnvsToRun->{data}}, [$environment, $duration, $config];
When I try to add it to a list with 3 columns, I get the array ref, but if I take the square brackets off, I get three separate entries, with the variable argument in the first column of each entry with they other two as 0s. If I use the brackets, I get the array ref, and then the other two columns are fine. I've tried a few combos of parantheses and brackets, but the brackets seem to be the only things that matter.
| [reply] [d/l] |