#!/usr/local/bin/perl use strict; use DBI; my $dbh = DBI->connect("DBI:Oracle:classdb", "username", "password"); my $sth = $dbh->prepare("select * from mytable") || die "Error in DBI::prepare: $!"; $sth->execute || die "Error in sth::execute: $!"; while (my $row = $sth->fetchrow_arrayref) { print "@$row\n"; }