$var1, $var2, and $var3 are each array references that you need to dereference to get their elements. {$var1, $var2, $var3} constructs an anonymous hash, not an array, you want [] instead. my $data = [@$var1, @$var2, @$var3]; produces your expected output. References: perldsc, perlreftut, perlref.
In reply to Re: Merge hashrefs into one
by haukex
in thread Merge hashrefs into one
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |