sub getNullEndIds{ my $self = shift; my $dbh = DBI->connect($dbi,"monster_mirror","m1rr0r",{'RaiseError' => 1}); my $sth = $dbh->prepare("SELECT id from high where end IS NULL"); $sth->execute(); my @id; while(my @dummy = $sth->fetchrow_array()){ push(@id,$dummy[0]); } $sth->finish(); $dbh->disconnect(); return @id; }