in reply to Unable to store value in array??

Welcome to the world of programming, which is much better learned by doing than by hearing. Although of course you've got to start somewhere.

  1. I suggest going over the tutorials on this site.
  2. Work out the algorithm as steps in English, not necessarily as a program. How would you do it without a computer?
  3. Work out how to do what you describe in Perl.
Post what you have, both steps and code, and we can guide you.

Dum Spiro Spero