Use join on multi-dimensional array

2009-02-27 Thread 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 format by using the 'join' command like

Re: Use join on multi-dimensional array

2009-02-27 Thread Gunnar Hjalmarsson
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' ], );

Re: Use join on multi-dimensional array

2009-02-27 Thread Jenda Krynicky
From: Bill Harpley bill.harp...@ericsson.com 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

Re: Use join on multi-dimensional array

2009-02-27 Thread Jim Gibson
On 2/27/09 Fri Feb 27, 2009 5:21 AM, Bill Harpley bill.harp...@ericsson.com 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

Re: Use join on multi-dimensional array

2009-02-27 Thread John W. Krahn
Jenda Krynicky wrote: From: Bill Harpley bill.harp...@ericsson.com 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