Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: how to print two array with new line at end of each second array element, using a single print statement?

by trizen (Hermit)
on Apr 21, 2012 at 13:28 UTC ( #966356=note: print w/ replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://966356]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (14)
As of 2016-04-28 20:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    :nehw tseb si esrever ni gnitirW







    Results (435 votes). Check out past polls.