in reply to Undefined Array Reference
Maybe something like this?
... for my $i (0..$#$ref_a) { push @{$ref_a->[$i]}, @{ ref($ref_b->[$i]) eq 'ARRAY' ? $ref_b->[$i] : [(' ') x 3] }; } print Dumper($ref_a); __END__ $VAR1 = [ [ 'a', 'b', 'c', 'j', 'k', 'l' ], [ 'd', 'e', 'f', 'm', 'n', 'o' ], [ 'g', 'h', 'i', 'p', 'q', 'r' ], [ 'x', 'y', 'z', ' ', ' ', ' ' ], [ '3', '4', '5', ' ', ' ', ' ' ], [ '6', '7', '9', ' ', ' ', ' ' ] ];
... my interpretation of the "space in the $ref_b" :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Undefined Array Reference
by wol (Hermit) on Apr 23, 2009 at 16:05 UTC |