Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 avoiding work at the Monastery: (5)
As of 2014-09-19 00:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (129 votes), past polls