in reply to undefined elements in array

Why not use a hash? This is where they shine:

## I don't know how you're getting values for $i, $j, $value $hash{$i}{$j} = $value;
Update2: To print:
foreach $i (keys %hash) { foreach $j (keys %{ $hash{$i} }) { print $i, $j, $hash{$i}{$j}, "\n"; } }
Hope this works for you.

Update1: If you insist on arrays, however, this will also work (but is more work):

push @array, "$i:$j:$value"; ## to print: foreach (@array) { print join (' ', split ":"); }
@a=split??,'just lose the ego and get involved!';
for(split??,'afqtw{|~'){print $a[ord($_)-97]}