Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
These records will have the same number of values but there can be any number of records.([a1v1,a1v2,a1v3,a1v4], [a2v1,a2v2,a2v3,a2v4], [a3v1,a3v2,a3v3,a3v4])
These obviously correspond to the record values. What I would like to do is simply print out the field name and then the field value, e.g.:("f1","f2","f3","f4")
Im having a small problem with this! My code at the moment consists of the following:f1: a1v1 f2: a1v2 f3: a1v3 f4: a1v4 f1: a2v1 f2: a2v2 f3: a2v3 f4: a2v4 f1: a3v1 f2: a3v2 f3: a3v3 f4: a3v4
I dont suppose there is anyone out there at this time in a morning to shed a bit of light on this?!for (my $x = 0; $x < $record_count; $x++) { foreach (@column_names) { print $_ . ": " . @$aref[$x] . "\n" unless $found; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: match array values to AoA values
by BrowserUk (Patriarch) on Mar 11, 2005 at 02:57 UTC | |
by wfsp (Abbot) on Mar 11, 2005 at 10:34 UTC | |
|
Re: match array values to AoA values
by Roy Johnson (Monsignor) on Mar 11, 2005 at 04:34 UTC | |
|
Re: match array values to AoA values
by chas (Priest) on Mar 11, 2005 at 03:14 UTC |