for my $newline (@lines) { printf $newline; # print the contents of the filled array }