Thanks, the hash reference gets pushed onto the list, and now exposes
more of my ignorance.
Say I have three rows returned by my SQL query. The while loop
properly generates three hashes, and @servers grows to contain three
elements, but each has the same hash reference, which ends up pointing
to the last created hash. How do I programatically generate a series
of hash references?
On Monday, November 22, 2004, at 06:34 PM, Bill Moseley wrote:
> On Mon, Nov 22, 2004 at 04:41:11PM -0800, Bill Conlon wrote:
>> I'm trying it along these lines:
>> while (@ary = $sth->fetchrow_array ())
>> %hash = (
>> base_url => $ary,
>> max_depth => $ary,
>> push @servers, %hash;
> push @servers, \%hash;
> You want to push a hash reference on the list.
> Bill Moseley
> Unsubscribe from or help with the swish-e list:
> Help with Swish-e:
Received on Wed Nov 24 12:06:43 2004