What errors are you getting? I don't know the first thing about Mason, but this bit

values $ARGS{LineItem}
looks wrong, because the argument to the values builtin should be a hash, and $ARGS{ LineItem } is a scalar. Maybe you want something like this?
values %{ $ARGS{ LineItem } }
Likewise, I suspect this
my @lineitems = $ARGS{"LineItem"};
is not doing what you want (it creates an array of one item, which, in this case at least, would not warrant iterating over with a foreach loop). Maybe you want
my @lineitems = @{ $ARGS{ LineItem } }
but both this and my earlier suggestion can't both be right (Perl doesn't permit something that is a reference to both an array and a hash).

There are other basic syntax errors in your code, which suggests to me that reading perldata, perlreftut, and perlref would be useful to you. Otherwise I think you will be "programming by trial and error", which is not only painful but dangerous, because your only indication of success is when the thing "runs" and terminates normally. A program can easily pass this test and still be completely wrong.

Also, from your code it is not clear to me what $i (i.e. ${i}) is.

the lowliest monk


In reply to Re: Parsing cgi variable lists by tlm
in thread Parsing cgi variable lists by inblosam

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.