in reply to Re^4: DBD::SQLite failing to return data?
in thread DBD::SQLite failing to return data?

would this work (untested)?
while( my $data = $sth->fetchrow_arrayref || die $sth->errstr; ) { print "$data : @{ $data }"; }
the hardest line to type correctly is: stty erase ^H

Replies are listed 'Best First'.
Re^6: DBD::SQLite failing to return data?
by BrowserUk (Patriarch) on Nov 11, 2010 at 03:29 UTC

    You'd have to drop the semi-colon :)

    But even then, it would die when it reached the end of the data, rather than exiting the loop cleanly and moving on to the next step of the processing.

      i'm sure i've seen something that gets around this, in an old mysql (4.x) book. sorry.
      the hardest line to type correctly is: stty erase ^H