in reply to Using Oraperl for the first time... (was: Using DBI for the first time...)
#!/usr/bin/perl -w use strict; use DBI; use Oraperl; use Env; my $DB = "DBNAME"; my $UN = "USERNAME"; my $PW = "PASSWORD"; my ($dbh,$sql,$c,$cursor,@MYARRAY,$numElements); $dbh = &ora_login($DB,$UN,$PW) or die("Oracle login FAILED."); $sql = "select distinct(clli) from gvc_traffic30"; $cursor = &ora_open($dbh,$sql) or die("Failed query (bad query?). $!\n +"); @MYARRAY= &ora_fetch($cursor) or die("Failed to get return from query. + $!\n"); foreach my $clli ( @MYARRAY ) { chomp($clli); sleep(5); $c++; if ( /\W/ ) { print "Found bad character in line $c."; } else { print "This clli appears to be OK."; } print " : $clli\n"; }
Perhaps the Oraperl.pm is not widely used?
----------
- Jim
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Using DBI for the first time...
by htoug (Deacon) on Aug 21, 2001 at 10:50 UTC | |
by snafu (Chaplain) on Aug 21, 2001 at 18:01 UTC |