I need to write a wrapper function for calls to
$sth->fetchrow_array() where the SELECT statement will return multiple 
rows.

such that

sub do_sql_array ($@) {
     # on initial call: $sth = $dbh->prepare(); $sth->execute();
     # on initial and subsequent until no more rows: return on row from
     #          $sth->fetchrow_array()
     # on no more rows to return: return () - an emply list
}

I know this can be down with a closure or an OBJECT, but for some reason 
its escaping
me.  Anything like this been done before ?

Anyone point me in the right direction ?

Reply via email to