Please check the following code. I want to print array, but it only print the first item in array.
$prefix = 'ABC';
$search_pc_exclude = "PC1 PC2 PC3";
@exclude = split(/\s+/, $search_pc_exclude);
push @prefix, {"pre" => $prefix, "exc" => @exclude};
print $prefix[0]->{pre};
print $prefix[0]->{exc}; #why this is not array?