I created an array like so:
while(@results = $execute->fetchrow())
{
my $active = 'true';
if($results[1] == 0)
{
$active = 'false';
}
my @campaign = ($results[0], $active);
push(@campaign_names, @campaign);
}
Later, when I need to access the name of the campaign (which is the first element of the campaign array), I can't seem to extract it. What is the proper syntax?
foreach $campaign (@campaign_names)
{
print ????;
}
Thanks!