I'm guessing here, so bear with me...

I remember reading in the camel book how one ought to be careful about using || vs. 'or' when used in conjuction with list operators (or subs without parenthesis).

i.e. use
 open FILE, ">$file" or die "Oops";
or
 open (FILE, ">$file") || or die "Oops";
but not
 open FILE, ">$file" || or die "Oops";

So, I'm a guessing that you need to change line 30 to (note additional parenthesis) ...

$sth->execute() || die "Could not execute SQL statement ... maybe inva +lid?\n$!";
or maybe change the || to 'or'
$sth->execute or die "Could not execute SQL statement ... maybe invali +d?\n$!";
Let me know if I guessed right (or even if I guessed wrong).

Sandy

Quote from the camel book:

As lower precedence alternatives to &&, ||, and !, Perl proveds the and, or, and not operators. The behaviour of these operators is identical -- in particular, and and or short-ciruit like their counterparts, which makes them useful not only for logical expressions but also for control flow.

Since the precedence of these operators is much lower than the ones borrowed from C, you can safely use them after a list operator without the need for parentheses:

unlink "alpha", "beta", "gamma" or gripe (), next LINE;
With the C-style operators you'd have to write it like this:
unlink("alpha", "beta", "gamma") || (gripe(), next LINE);

In reply to Re: DBI::ODBC Delete Error by Sandy
in thread DBI::ODBC Delete Error by vbrtrmn

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.