It sounds like Text::CSV will do what you want.
Please note that the majority of the code you posted has nothing to do with your question: this just leads to confusion (and perhaps frustration) when attempting to isolate the handful of relevant lines from the two screenfuls of code you posted. A better question will get better answers: the guidelines in "How do I post a question effectively?" can help you achieve this.
-- Ken
In reply to Re^3: How to pass arrays into this program?
by kcott
in thread How to pass arrays into this program?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |