in reply to printing arrays
Assuming there are as many ids as names:
use strict; use warnings; my @ids = (123, 456, 789); my @names = qw(Smith Doe Allen); foreach my $i (0 .. $#ids) { print "$ids[$i] $names[$i]\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: printing arrays
by kdj (Friar) on Dec 31, 2008 at 14:45 UTC | |
by Spooky (Beadle) on Dec 31, 2008 at 15:16 UTC | |
|
Re^2: printing arrays
by Spooky (Beadle) on Dec 31, 2008 at 15:14 UTC |