I was reading the adding multiple value to a hash thread and I checked out the perldoc and I was wondering if this code is ok:
I am calling my function "TicketTable" that returns this:
my @sub_return array is getting re-initialized each time I call the function with my so I think I am ok, but should my code be:
I am dereferencing this way:
????????
Nick
I got a Biz Degree! How the h*ll did I get here?
Code:
my @ticTblCnts = ();
my $tableIndex = 0;
foreach my $loc (@out_locations) {
foreach my $crit(@out_priorities) {
foreach my $ty (@out_types) {
my $combin = ("$loc,$crit,$ty");
$ticTblCnts[$tableIndex] = TicketTable ($combin, \@tic_vars);
$tableIndex++;
}
}
}
I am calling my function "TicketTable" that returns this:
Code:
return (\@sub_return);
my @sub_return array is getting re-initialized each time I call the function with my so I think I am ok, but should my code be:
Code:
my @ticTblCnts = ();
my $tableIndex = 0;
foreach my $loc (@out_locations) {
foreach my $crit(@out_priorities) {
foreach my $ty (@out_types) {
my $combin = ("$loc,$crit,$ty");
$ticTblCnts[$tableIndex] = [red] [ TicketTable ($combin, \@tic_vars) ] [/red];
$tableIndex++;
}
}
}
I am dereferencing this way:
Code:
my @ticTblDeref = ();
foreach (@ticTblCnts) {
push (@ticTblDeref,@$_);
}
????????
Nick
I got a Biz Degree! How the h*ll did I get here?