I swear that some day I will understand references. In the meantime...

I wrote some perl that used a hash where each value was a reference to an array. No problem. Here is the segment from within a foreach loop that populates the hash.

       @storedates = ($sdates, $idates);
       $datestore{$oldgrantid} = [EMAIL PROTECTED];

I thought this would work. But it doesn't. I end up with the same array reference for each key and the same values, the last ones of the series.

The fix was to change it to:

$datestore{$oldgrantid} = [$sdates, $idates];

Using the same array reference name (@storedata) does not work even though the values are different.

I'm interested in a bit more explanation about why this didn't work. I thought I was 'getting' it until this latest struggle.

Thanks.
--
Peter Fleck
Webmaster | University of Minnesota Cancer Center
Dinnaken Office Bldg.
925 Delaware St. SE
Minneapolis, MN  55414
612-625-8668 | [EMAIL PROTECTED] | www.cancer.umn.edu
Campus Mail: MMC 806

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to