This my ($data) = {$var1, $var2, $var3}; to create a hash doesn't make any sense, the error is correct.
I don't understand what you're desired output is, so please specify.
Try $a_new= [ @$var1, @$var2, @$var3 ]
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re: Merge hashrefs into one
by LanX
in thread Merge hashrefs into one
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |