#!/usr/bin/perl -w use strict; use DBI; use Env; my $DB = "DBNAME"; my $UN = "USERNAME"; my $PW = "PASSWORD"; my ($dbh,$sth,$clli,$c); $dbh = DBI->connect("dbi:Oravel:$DB",$UN,$PW, {AutoCommit => 0, RaiseError => 1) or die("Oracle login FAILED, $DBI::errstr"); $sth = $dbh->prepare("select distinct(clli) from gvc_traffic30"); $sth->execute; $sth->bind_col(1, \$clli); while ($sth->fetchrow_arrayref ) { $c++; if ($clli =~ /\W/ ) { print "Found bad character in line $c."; } else { print "This clli appears to be OK."; } print " : $clli\n"; }