#!/usr/bin/perl use warnings; use strict; use Data::Dumper; # Be sure to copy the subroutine code into here. my @tree1 = ( [ [ 'red', 'orange', 'yellow', undef, undef, undef ], [ undef, undef, undef, 'cyan', 'magenta', 'black' ] ], [ [ 'red', undef, 'yellow', undef, 'magenta', undef ], [ undef, 'orange', undef, 'cyan', undef, 'black' ] ], ); my @done =( [ [ 'red', 'orange', 'yellow', 'cyan', 'magenta', 'black' ], [ 'red', 'orange', 'yellow', 'cyan', 'magenta', 'black' ] ] ); my @tree2 = Combine_Branches (\@tree1, 1, 3); my $done_string = Dumper(@done); my $tree2_string = Dumper(@tree2); print "Combine_Branches(\@tree1, 0, 3);\n"; if ( $done_string ne $tree2_string ) { print "Ack, not the same.\n"; print "$tree2_string\n"; print "$done_string\n"; } else { print "Everything is joy.\n" }