in reply to Re^2: Array of hashes reference problem
in thread Array of hashes reference problem
The problem is that this doesn't just create an array. It creates an array with a single element that contains an empty string. It's basically equivalent toour @arrayAoH = "";
The solution is to either leave out the assignment or to assign it an empty list (which is different from an empty string):our @arrayAoH; $arrayAoH[0] = "";
More formally, a simple scalar value in list context is treated as a list of length one containing that value.our @arrayAoH = ();
|
|---|