in reply to elements of an array
my @array = map { $Product[$_] - $State[$_] } 0..$#State;
Of course I could be misinterpreting your question entirely. Others have assumed that you mean you want to join all elements together. For that, you use join. But if your intention is to subtract each element of @State from the element of the same index number from @Product, this is how it's done. I only mention it because I see that minus sign in your example.
Dave
|
|---|