Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: printing arrays

by kyle (Abbot)
on Dec 31, 2008 at 17:06 UTC ( [id://733511]=note: print w/replies, xml ) Need Help??


in reply to printing arrays

If you don't mind destroying the arrays, you can do it this way.

printf "%s %s\n", shift( @ID ), shift( @name ) while @ID && @name;

My first thought, however, was the List::MoreUtils solution that borisz gave.

Update with a slightly silly way:

my @nyuck = ( @ID, reverse @name ); printf "%s %s\n", shift( @nyuck ), pop( @nyuck ) while @nyuck;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-24 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found