$sth = $dbh->prepare($sql); $sth->execute() || die $sth->errstr; while ($pointer = $sth->fetchrow_hashref) { $line=$pointer->{'LINE'}; $ins =$pointer->{'INS#'}; $number =$pointer->{'NUMBER#'}; if($line_type) { $ result = "Found $line
"; exit; } else { print " \n"; exit; } } } print $line;