http://www.perlmonks.org?node_id=966356


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;
  • Comment on Re: how to print two array with new line at end of each second array element, using a single print statement?
  • Download Code