August 1999 Perl Hardware Store Slide #18

Adding a new Method to a Package

         my $sth = $dbh->query(...);
         error() unless defined $sth;
         my $num_records = $sth->numrows();
         for ($i=0; $i<$num_records; $i++) {
           # Get next record
           my %data = $sth->fetchhash();       
           # Do something with %data
         }


Next Copyright © 1998 M-J. Dominus