in reply to Re^5: Array_ref into Array_ref Help.
in thread Array_ref into Array_ref Help.

That's right, but the reason to ask is that what and where would be the more logical place to check for inconsistency, check first if the element is empty or undef and where to assign a empty value so when displaying the report it would show a blank space on the report.

Replies are listed 'Best First'.
Re^7: Array_ref into Array_ref Help.
by lostjimmy (Chaplain) on Apr 22, 2009 at 19:52 UTC
    In the interest of not learning...
    my $max = $#$ref_a > $#$ref_b ? $#$ref_a : $#$ref_b; my @blank_a = ("") x @$ref_a; my @blank_b = ("") x @$ref_b; my @result = map { [ $ref_a->[$_] ? @{$ref_a->[$_]} : @blank_a, $ref_b->[$_] ? @{$ref_b->[$_]} : @blank_b ] } 0..$max;
    By the way, anyone have a prettier way to do this?