Your original node didn't state what $n1 or $n2 were supposed to be. Multiple respondents (myself included) assumed that you made a mistake in the assignment of your @array_num variable. Furthermore, I stated that I was making an assumption about what you wanted in $n1 and $n2.
I've re-read your original post as well as your reply to mine, and I still don't know what you want for $n1 and $n2. I'm going to now assume that you know what they are, as well as how to populate them, unless you give more specific information about what you want in them.