Jenda Krynicky wrote:
From: "Bill Harpley"
Suppose I have a multidimensional array of the form:
@array[names][values]
For example, I have a list of database field names and the value
associated with each one.
If this was a single dimensional array called @list, I could create an
output line
On 2/27/09 Fri Feb 27, 2009 5:21 AM, "Bill Harpley"
scribbled:
> Suppose I have a multidimensional array of the form:
>
> @array[names][values]
There is no such construct in Perl. An array is a one-dimensional list of
scalar values, indexed by integers. You can emulate multi-dimensional array
From: "Bill Harpley"
> Suppose I have a multidimensional array of the form:
>
> @array[names][values]
>
> For example, I have a list of database field names and the value
> associated with each one.
>
> If this was a single dimensional array called @list, I could create an
> output line in CSV
Bill Harpley wrote:
Suppose I have a multidimensional array of the form:
@array[names][values]
For example, I have a list of database field names and the value
associated with each one.
Is this what you mean:
my @record = (
[ col1 => 'val1' ],
[ col2 => 'val2' ],
);
Suppose I have a multidimensional array of the form:
@array[names][values]
For example, I have a list of database field names and the value
associated with each one.
If this was a single dimensional array called @list, I could create an
output line in CSV format by using the 'join' command like