-- snip --
$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); $c++; if ( /\W/ ) { print "Found bad character in line $c."; } else { print "This clli appears to be OK."; } print " : $clli\n"; }
-- !snip --
The script is supposed to grab a list of items from the database that have either been stored properly or have been stored with improper characters in them. I will eventually get to fixing that but for now I am using my problem as a way or learning DBI. I am only concerned with seeing the data in the table for now (plus of course sorting each row out with non-alphanumerics in them).
I have tried for loops, foreach loops (above), and while loops (of course didn't work)...none of which seem to work so I can only assume that I am not getting the proper data into the proper data type somehow... ???
My current output is:
$ perl traffic.pl Use of uninitialized value in pattern match (m//) at traffic.pl line 3 +6. Use of uninitialized value in concatenation (.) at traffic.pl line 41. This clli appears to be OK. : $
Suggestions would be very much appreciated.
----------
- Jim
Edit: chipmunk 2001-08-20
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |