I'm getting an error returned for this subroutine...

sub Go_Check_ID { my $id_2_check = shift; my $in_there_already = 0; my $is_completed = 0; my $is_failed = 0; my $is_denied = 0; my $is_pending = 0; my $which_db = ""; if ($is_subscrb) { $which_db = "subscrb"; } else { $which_db = "nonsubscrb"; } my $dbh = MyMODULE::NameConnect(); $sth = $dbh->prepare (qq{ SELECT * FROM $which_db WHERE id = ? }); $sth->execute($id_2_check); $row = $sth->fetchrow_hashref(); $sth->finish(); if ($row && $row->{id} =~ /^$id_2_check$/) { $in_there_already++ if ($row->{payment_status} =~ /^Pending$/i) { # Line 311 $is_pending++; } elsif ($row->{payment_status} =~ /^Failed$/i) { $is_failed++; } elsif ($row->{payment_status} =~ /^Denied$/i) { $is_denied++; } elsif ($row->{payment_status} =~ /^Completed$/i) { $is_completed++; } } if ($in_there_already == 0) { return("JUST_ADD_IT"); } elsif($in_there_already == 1 && $is_completed == 0 && $is_failed + == 0 && $is_denied == 0 && $is_pending == 1) { return("JUST_UPDATE_IT"); } elsif ($in_there_already == 1 && ($is_completed == 1 || $is_fail +ed == 1 || $is_denied == 1)) { return 0; } } # Line 329


That is the whole subroutine.

Here is the error:
I marked which lines those are in the subroutine.

I've added this line to it:


It has not given me any more help though. I do have -w defined and I added Strict and cleaned up the code.

Still I am getting this error. Plus I'm getting a whole bunch of these "warnings" I guess you'd call them.
Warnings:

I don't know why those are there. I assume it's because I have a if/then statement where if one statement is true it will use that sites "module". The modules are identical, the ONLY difference is the usernames/passwords for the mysql connections.

I'd appreciate any advice anyone might have.

thx,
Richard

In reply to Error in Syntax... by powerhouse

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.