1. You test the value of !$data[0] before assigning anything to it. So you end up testing whether or not you need to insert a $comp_id based on the result of the previous $comp_id.
2. Have you SQL-sanatized your comp_names? you need to replace any single quotes in a company name with two single quotes, otherwise the SQL statement will yield a syntax error. Try something along the lines of
Also, it would help if you said what kind of errors you were getting...map {$hash{$_} =~ s/'/''/g;} (keys %hash);
In reply to Re: Hash Value Part 2
by ton
in thread Hash Value Part 2
by qball
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |