http://qs1969.pair.com?node_id=460155


in reply to DBI reports too many bind variables

In addition to the useful advice of escaping your pipe character, I would also advise you to code defensively. i.e. check your data before passing it to the "execute" method.

my @player_rec = split /\|/; if (scalar(@player_rec) == scalar(@fields)) { if ($sth->execute(@player_rec)) { print "Worked, cool"; } else { print "Didn't work, uncool, error is: $DBI::errstr"; } } else { warn "incorrect number of fields at line $.\n"; warn sprintf("expected: %d but found %d\n",scalar(@fields), scala +r(@player_rec)); }