[EMAIL PROTECTED] wrote: > That's much better than my method. Didn't know you could push blocks > of data like that. > > Cool :)
Easiest way to see is use Data::Dumper and then print Dumper ( [EMAIL PROTECTED] ). Then you can see the setup. Especially nice when you tell the Dumper to sort in order and you are using say a hash which has array. Wags ;) > > -----Original Message----- > From: Wagner, David --- Senior Programmer Analyst --- WGO > [mailto:[EMAIL PROTECTED] > Sent: Friday, June 03, 2005 3:01 PM > To: [EMAIL PROTECTED]; beginners@perl.org > Subject: RE: Two Dimensional Array Problem > > > [EMAIL PROTECTED] wrote: >> I am trying to send the output of a mysql query to a two dimensional >> array. >> >> This is what I've tried using push. >> >> while (@results = $sth->fetchrow_array ()) >> { >> $x = $results[0]; >> $y = $results[1]; >> push (@data,[$x],[$y]); > > push( @data, [ $x , $y ] ); > Access would be for first 0,0, 0,1, 1,0,1,1, etc > > Wags ;) >> } >> >> However, I don't get back a two dimensional array, I get back a >> single array of @data. >> >> Thanks. -Aaron > > > > ******************************************************* > This message contains information that is confidential > and proprietary to FedEx Freight or its affiliates. > It is intended only for the recipient named and for > the express purpose(s) described therein. > Any other use is prohibited. > ******************************************************* > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>