I suggest that you study this line:
my (@nums) = /,\s*(\d+)/g;
It could very well be that it takes you all day to come close to understanding what that does, but such is the nature of learning something that is both new and complicated.

The major failures in your posting(s): Incomplete/inadequate specification of the problem. And apparently a complete lack of effort on your part to learn from the Monk replies. This last part is the issue that is causing the most problems.

Your problem can be solved easily with a combination of a text editor and Excel. If you are not willing to put in the effort to learn Perl, then just ask a friend in the accounting department to whip out an answer with off-the-shelf software.

Update:
Ok, I don't want to torture you with something that is obvious to the average Monk. A simple way is:

my (@nums) = /,\s*([-\d]+)/g;
In the future, please understand that PerlMonks is about learning Perl.

In reply to Re^5: Skip lines until you find a delimiter >> by Marshall
in thread Skip lines until you find a delimiter >> by RohanGuddad

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.