Ok I see the problem. %in is actually just a hash of parameters and not an object. Try this:
my @list = exists $in{ID} && ref $in{ID} eq 'ARRAY' ? @{$in{ID}} : $in{ID};
for (@list) {
my $query = qq!UPDATE $db_comments SET messageread = '0' WHERE ID = ! . $DBH->quote($_);
return $DBH->do($query) ? &html_view_messages("User updated.") : &html_view_messages("Error updating user. Reason: $DBI::errstr");
}
}
Code:
sub mark_unread { my @list = exists $in{ID} && ref $in{ID} eq 'ARRAY' ? @{$in{ID}} : $in{ID};
for (@list) {
my $query = qq!UPDATE $db_comments SET messageread = '0' WHERE ID = ! . $DBH->quote($_);
return $DBH->do($query) ? &html_view_messages("User updated.") : &html_view_messages("Error updating user. Reason: $DBI::errstr");
}
}