push tries to add items to its first argument. Your loop is resetting @result each time through. You probably want something like:
while (@result = $sth->fetchrow_array()) { push @dept, @result; }
In reply to Re: push result into array
by kyle
in thread push result into array
by djbryson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |