This code looks like it should work. here are a few things i would check.:
go into the sql tool for whatever DB you are using and try entering the command you think you are sending. The DB could have a trigger that does something to the data.
look at your schema, you are treating prices as a string in the sql statement, but it may be types are something else in the db and you are getting somekind of conversion bug.
try using placeholders instead of interpolation:
my $query = "UPDATE items SET price=? WHERE itemref=?;";
print $query;
$sth = $dbh->prepare ( $query );
$sth->execute ($price,$itemref);