in reply to Bizzare comma bug

If the field is decimal, why are you trying to store a string in it? The usual syntax in that condition is

UPDATE items SET price=23501.35 WHERE itemref='S10099';

Second, rather than directly storing the value in the string, you should use placeholders: perhaps something like this:

my $query = "UPDATE items SET price=? WHERE itemref=?"; $sth = $dbh->prepare ( $query ); $sth->execute ($price, $itemref); $sth->finish ();

It can make your life significantly easier - see DBI for details.