Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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

by trizen (Friar)
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 drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2015-05-23 04:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (465 votes), past polls