[PLUG] Perl 3D array - printing all values

Randal L. Schwartz merlyn at stonehenge.com
Thu Oct 23 00:56:01 UTC 2003


>>>>> "Colin" == Colin Kuskie <ckuskie at dalsemi.com> writes:

Colin> On Wed, Oct 22, 2003 at 01:12:16PM -0700, Matt Alexander wrote:
>> This should be an easy one for you Perl gurus...  ;-)
>> 
>> I have a 3 dimensional array in Perl...
>> 
>> $myarray[$val1][$val2][$val3]
>> 
>> I would like to print every value in the array.

Colin> Cheap, but works depending on the end product.

Colin> use Data::Dumper;

Colin> print Dumper(\@myarray);

use YAML;

print Dump \@myarray;

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



More information about the PLUG mailing list