Hi, new to the list here; quick question !
How do I nest multiple arrays in one 'foreach' statement ?
ex.
@animals = ("cat",
"dog",
"ferret",
"mouse"
);
@petfood = ("meow mix",
"dog chow",
"ferret food",
"mouse food"
);
foreach $object (@animals) {
print "animal = $object and food = @petfood";
}
The results I am lookg for are
animal = cat and food = meow mix
animal = dog and food = dog chow
animal = ferret and food = ferret food
animal = mouse and food = mouse food
Thanks alot for you help
Is there a better way of doing this also ?
**DAN**
- Re: [Perl-unix-users] Nesting foreach using multiple a... danegron
- Re: [Perl-unix-users] Nesting foreach using multi... $Bill Luebkert
- RE: [Perl-unix-users] Nesting foreach using multi... Peter Eisengrein
- RE: [Perl-unix-users] Nesting foreach using multi... EUROSPACE SZARINDAR