I'm sure this is very simple and I am overlooking something. I want to read a list of bad email addresses from a file and remove them from my database.
If I print $_, the email addresses are correct, if I try to remove them from the db I get errors on just the characters before the @. Here is what I have: == #!/usr/bin/perl -w use strict; use DBI; use DBD::Pg; my $infile = $ARGV[0]; open( INFILE, "<$infile" ); while( <INFILE> ) { my $dbh = DBI->connect("dbi:Pg:dbname=*, "*", "*") || die; #s/\@/\\@/; #print $_; my $sth = $dbh->prepare("UPDATE table SET email = '' WHERE email = $_ ") || die; $sth->execute; finish $sth; $dbh->disconnect; } close( INFILE ); == -- Charles Farinella Appropriate Solutions, Inc. (www.AppropriateSolutions.com) [EMAIL PROTECTED] 603.924.6079 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>