in reply to how to print two array with new line at end of each second array element, using a single print statement?
is there any way to get a one line print statement?Yes:
my $str = q{}; { my $i = 0; $str .= join(q{ }, $nums[$i] // last, $dat[$i++] // last) . "\n" w +hile 1; } print $str;
|
---|
In Section
Seekers of Perl Wisdom