Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Errors in Code

by AcidHawk (Vicar)
on Apr 16, 2003 at 09:40 UTC ( [id://250824]=note: print w/replies, xml ) Need Help??


in reply to Errors in Code

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://250824]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2024-04-19 20:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found