Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: Errors in Code

by AcidHawk (Vicar)
on Apr 16, 2003 at 09:40 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (1)
As of 2023-09-22 02:14 GMT
Find Nodes?
    Voting Booth?

    No recent polls found