Ditch your my @row near the top of the script, and do your loop like this:
while (my @row = $sth->fetchrow_array())
In your current code, the scope for @row is too large, so you're effectively pushing multiple references to the same array onto @results.
As a general rule, always declare a variable as close as possible to where it's going to be used.
In reply to Re: Pushing Array ref to array
by tobyink
in thread Pushing Array ref to array
by packetstormer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |