Is this what you're trying to say?
#Get all accounts for current term::: my $sql_back="SELECT ABC1,ABC2,ABC3,ABC4,ABC5,ABC6, ABC7, ABC8 FROM TBIBM WHERE ABC2='$account_num' AND ABC6 = '$accou +nt_due_date' AND ABC5='$n_year'"; my $sth = $dbh->prepare($sql_back); $sth->execute() || die $sth->errstr; $sql_net="UPDATE today_records SET current_prem= ? WHERE account_num= ? AND type='OK'"; my $sth2 = $dbh_2->prepare($sql_net); while (my $pointer = $sth->fetchrow_hashref){ $count++; $ABC1 = $pointer->{'ABC1'}; $ABC2 = $pointer->{'ABC2'}; $ABC3 = $pointer->{'ABC3'}; $ABC4 = $pointer->{'ABC4'}; $ABC5 = $pointer->{'ABC5'}; $ABC6 = $pointer->{'ABC6'}; $ABC7 = $pointer->{'ABC7'}; $ABC8 = $pointer->{'ABC8'}; #done getting all accounts , need to update web db once again w +ith new data! #$sql_net="UPDATE today_records #SET current_prem= CONVERT(money, '$ABC7') #WHERE account_num='$ABC2' AND type='OK'"; #my $sth = $dbh_2->prepare($sql_net); #$sth->execute() || die $sth->errstr; $sth2->execute(CONVERT(money, '$ABC7'),'$ABC2') +|| die $sth2->errstr; }

In reply to Re^4: Perl Code Efficiency Issue by Anonymous Monk
in thread Perl Code Efficiency Issue by Anonymous Monk

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.