push @rows, @fields just pushes all the elements of @fields on to @rows
What you need to do is push an arrayref on to @rows:
push @rows, \@fields
perldsc has much more to say about Perl data structures
update: For the above to work, you should be declaring @fields using my (which is best practice anyway).
In reply to Re: Using Array of Arrays
by FunkyMonk
in thread Using Array of Arrays
by Aim9b
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |