in reply to Adding cols to 3d arrays - syntax

Hi, first off, your life would be easier if you used hashes for nested data.

With

push @{ $myarr[$lpn] }, $ppn;
you are adding a scalar value to your sub-array. Then later you try to push to it as if it were itself an array.

Probably changing the above line to

$myarr{$lpn}{$ppn} = ();
would get you on the right track.

Hope this helps!


The way forward always starts with a minimal test.