Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Some things I found...

    1. This doesn't compile as you have NOT declared any of your variables.

    2. You are using $CONTROL = $data[2] when you do the split but in your $sth statement you try to select where  control = $Control $CONTROL does NOT equal $Control.

    3. Your logic seems a little confusing, you are saying in the unless($matches) { that if you get no matches you will then update. That seems backwards what can you update if you get NO match and if you DO get a match you will then insert..?

    4. As Enlil says you disconnect before you run the do

Some good node can be found here at the Monastery talking about SQL queries etc here are a few I found interesting

Added: You also might like to change

if (-e "v:/tf_out.txt") { } else { die "File does not exist\n"; }
to something like
unless (-e "v:/tf_out.txt") { die "File does not exist\n"; }

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

In reply to Re: Errors in Code by AcidHawk
in thread Errors in 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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-25 15:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found