It looks like you are missing some " marks.. This is what your sql query should look like..

my $sql = ("INSERT INTO mf_forms (CLIENT,RECORD,CONTROL,CUSIP,FROMACC +T,F_IND,TOACCT,T_IND,". "FP,ORIGQTY,DIV,LTCG,STCG,SOCSEC,BKRNO,THIRD +PARTYCD,USERID,EDATE,". "ORIGAMT,CLOSEDIND,ADPSECNO,BRNCH,ACNT,TYPE,C +HKDIGIT,PDATE,ACTLQTY,". "ACTLAMT,CERTIND,REQST,RDATE,COMNTS,TRNFTYPE,F +ILLER1,ADR_L1,ADR_L2,ADR_L3,". "ADR_L4,ADR_L5,ADR_L6,FILLER_B,CERTNO1,CERTSHRS +1,CERTNO2,CERTSHRS2,CERTNO3,". "CERTSHRS3,CERTNO4,CERTSHRS4,CERTNO5,CERTSHR +S5,CERTNO6,CERTSHRS6,CERTNO7,CERTSHRS7,". "CERTNO8,CERTSHRS8,CERTNO9,CERTSHRS9,CERTNO10 +,CERTSHRS10,FILLER_B) VALUES ('". "$CLIENT,$RECORD,$CONTROL,$CUSIP,$FROMACCT,$F_I +ND,$TOACCT,$T_IND,". "$FP,$ORIGQTY,$DIV,$LTCG,$STCG,$SOCSEC,$BKRNO, +$THIRDPARTYCD,$USERID,$EDATE,". "$ORIGAMT,$CLOSEDIND,$ADPSECNO,$BRNCH,$ACNT,$T +YPE,$CHKDIGIT,$PDATE,$ACTLQTY,". "$ACTLAMT,$CERTIND,$REQST,$RDATE,$COMNTS,$TRNFTY +PE,$FILLER1,$ADR_L1,$ADR_L2,$ADR_L3,". "$ADR_L4,$ADR_L5,$ADR_L6,$FILLER_B,$CERTNO1,$CER +TSHRS1,$CERTNO2,$CERTSHRS2,$CERTNO3,". "$CERTSHRS3,$CERTNO4,$CERTSHRS4,$CERTNO5,$CERTSH +RS5,$CERTNO6,$CERTSHRS6,$CERTNO7,$CERTSHRS7,". "$CERTNO8,$CERTSHRS8,$CERTNO9,$CERTSHRS9,$CERTNO +10,$CERTSHRS10,$FILLER_B)");
what is happening is that the last ; is not being seen as inside "".

And you need to declare all thos e variables.. put the worh my in fron of each var.. something like my $CLIENT = $data[0];

Update: Along with putting a my in front of all tha vars you will need to add my (@data); at the top of your code somewhere for all the elements you use in each of the my $CLIENT = $data[0]; lines.

-----
Of all the things I've lost in my life, its my mind I miss the most.

In reply to Re: Problem with code by AcidHawk
in thread Problem with code by SamueD2

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.