print header(); #### print start_html(-bgcolor=>"#FFFFFF", -text=>"#000000", -style=>{code=>$somecode}, -script=>{code=>$Somejscript}); #### my ($sth, $row); $dbh = ; $sth = $dbh->prepare (qq{ SELECT * FROM mytable }); $sth->execute(); while ($row = $sth->fetchrow_hashref()) { # these are the rows that do exists do # what you want with those rows. } #### $sth = $dbh->prepare (qq{ SELECT * FROM mytable WHERE some_column = ? }); # The ? is a placeholder $sth->execute($str); # $str is what your searching for $row = $sth->fetchrow_hashref(); # This executes the above $sth->finish();# This closes the connection. #### $dbh = SOMEDIR::SOMENAME::Connect();