C
Chris Newman
@names = {"a","b","c"};
@occup = {"d","e","f'};
foreach $i @names {
print ("$names, $occup \n");
}
The result I am after follows
a,d
be
cf
I suspect that $i returns the value stored in each element in the array not
the index . How do I change the code to make this happen?
Thanks
@occup = {"d","e","f'};
foreach $i @names {
print ("$names, $occup \n");
}
The result I am after follows
a,d
be
cf
I suspect that $i returns the value stored in each element in the array not
the index . How do I change the code to make this happen?
Thanks