use references
#!/usr/bin/perl -- use strict; my @table; my @tableCellData; $tableCellData[0][0] = '0,0'; $tableCellData[0][1] = '0,1'; $tableCellData[1][0] = '1,0'; $tableCellData[1][1] = '1,1'; push @table, \$tableCellData[0][0]; push @table, \$tableCellData[0][1]; push @table, \$tableCellData[1][0]; push @table, \$tableCellData[1][1]; print $$_,"\n" for @table; $tableCellData[0][1] = 'foo'; print "----\n"; print $$_,"\n" for @table;
prints
0,0 0,1 1,0 1,1 ---- 0,0 foo 1,0 1,1
P.S. Your posts will be more readable if you read Markup in the Monastery
In reply to Re: Address of a specific element: an Array containing Array References ...
by ccn
in thread Address of a specific element: an Array containing Array References ...
by nmvega
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |