XP is just a number | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Maybe I'm mis-interpreting your question, but anyways,
you ask. if I push @results1, @results2, do i get: 'employee1','address1','payrate1','hiredate1', 'employee2','address2','payrate2','hiredate2', 'employee3','address3','payrate3','hiredate3', 'employee4','address4','payrate4','hiredate4' Well if you want a true multi-dimensional array, this isn't it. You just flattened it as MeowChow shows in Data::Dumper. To have a multi-dimensional array you want
This is Array of Arrays - or more clearly an Array of scalars that contain Array Refs. The '[]' show an array reference.</> To achive this you want push(@AoA,\@result1,\@result2)So let's say you want 'address2', you can access it by: my $foo = @AoA[1]->[1]HTH grep
In reply to Re: Pushing multi-dimensional arrays onto each other
by grep
|
|