That mostly worked. I had to use a while to get the array from the DB
return.
I wound up with this to get all the values I needed:
while (%result = $finalSet->fetchhash())
{
push @arr_DBanswers, values %result;
}
Is that good code practice? The the camel book (is it a camel) really
doesn;t help much with the array stuff.
brian
-----Original Message-----
From: Jason Tiller [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 12, 2001 9:04 PM
To: [EMAIL PROTECTED]
Subject: Re: Is there a better way to do this
Hi, Again, Brian, :)
On Wed, 12 Sep 2001, Bradshaw, Brian wrote:
> I have the code:
> $z = 0;
> foreach(@key = keys(%result))
> {
> $arr_DBanswers[$z] = $result{$_};
> $z=$z+1;
> }
> Is there a better way to break out the values in a hash list to a
> single array?
How about
@arr_DBanswers = values %result;
?
---Jason
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]