add 'my' in front of these variables.. my @row; my $oid;
Urmil -----Original Message----- From: Lance Prais [mailto:[EMAIL PROTECTED]] Sent: Monday, May 06, 2002 3:15 PM To: [EMAIL PROTECTED] Subject: unfamiler errors I am using the following code to extract data from a db and write to a file and getting errors that I am not familiar with: Does anyone know what I am doing wrong? #!/usr/local/bin/perl #ENVIRONMENT VARIABLES $CUSTOM = "/data/verity/custom-kb"; $SERVICE = "xxxxxxx"; $oracle_user = "xxxxxxx"; $oracle_password = "xxxxxxxx"; $unique_sr_list = "$CUSTOM/scripts/unique_sr_list.txt"; use strict; use DBI; open(TEXTFILE,">$unique_sr_list"); print "Checking for updated Service Requests: " . `date`; $connect_string="DBI:Oracle:$SERVICE"; my $dbh = DBI->connect($connect_string,$oracle_user,$oracle_password, { AutoCommit=> 0, LongTruncOk=> TRUE, PrintError => 1, ChopBlanks=> TRUE,LongTruncOk=> TRUE,LongReadLen=> 50000, RaiseError => 1 }) or die "connecting: $DBI::errstr"; # find the SR my $sql = qq{select distinct(nvl((c.sr_num),0)) from s_evt_act a, s_srv_req c where a.sra_sr_id = c.row_id and a.priv_flg = 'N' and a.last_upd between (sysdate-7) and sysdate intersect select (nvl((sr_num),0)) from s_srv_req b where b.x_cp_updated between (sysdate-1) and sysdate}; my $sth = $dbh->prepare ( $sql ); $sth->execute(); while( @row = $sth->fetchrow_array ) { $oid=$row[0]; print TEXTFILE"$oid\n"; } $sth->finish(); $dbh->disconnect(); Error message: Global symbol "@row" requires explicit package name at ./daily_sr.pl line 25. Global symbol "$oid" requires explicit package name at ./daily_sr.pl line 27. Global symbol "@row" requires explicit package name at ./daily_sr.pl line 27. Global symbol "$oid" requires explicit package name at ./daily_sr.pl line 29. Bareword "TRUE" not allowed while "strict subs" in use at ./daily_sr.pl line 17. Bareword "TRUE" not allowed while "strict subs" in use at ./daily_sr.pl line 17. Bareword "TRUE" not allowed while "strict subs" in use at ./daily_sr.pl line 17. Execution of ./daily_sr.pl aborted due to compilation errors. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]