in reply to Adding Hash Keys/Values
You are using compound keys to emulate a multidimensional array in your code, which is very Perl 4. With the addition of array references (a couple decades ago), I would do this with something like:
#!usr/bin/perl use strict; use warnings; use Data::Dumper; my @table = ( ['X', 'Y', 'Z'], ); print Dumper \@table; my $m=0; foreach my $n (0..3) { $table[$n][0] = $m++; }; print Dumper \@table;
See perlreftut.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|