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;