for ( my $c= 0; $c<= $#clk_output; $c++) { $clk_new = join '_', @{$clk_output[$c]}; push @clk_new, $clk_new; } print Dumper \@clk_new;