use DBI; # (Init w. AutoCommit=>1 occurs here) # Prepare the SELECT statement... my ($s) = $db->prepare ("SELECT * FROM table"); # ...and run it. my ($s_rv) = $s->execute(); # Wait patiently, run out of RAM... # Presumably, should be able to fetch data and use it here: while (my @row = $s->fetchrow_array()) { ... }