On Thursday, October 2, 2003, at 04:31 PM, A L wrote:

Thanks for helping me on my previous question; I was able to get it afterwards. I have another question. First, I have 3 arrays and wanted to print out the items of corresponding places in a sequential order. I have tried using foreach function, like below
foreach $a (@1){
foreach$b (@2){
foreach $c (@3){
$tog=$a."\t".$b."\t".$c"\n";
print $tog;
}
}
}

for (my $i = 0; $i < @1: $i++) { print "$1[$i] $2[$i] $3[$i]\n"; }

# or ..

print "$1[$_] $2[$_] $3[$_]\n" foreach 0..$#1;

Hope that helps.

James


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to