On Monday, May 6, 2002, at 01:15 , Lance Prais wrote:
[..]
>
>      while( @row = $sth->fetchrow_array )
>            {
>                        $oid=$row[0];
>
>                      print TEXTFILE"$oid\n";
>
>          }
[..]
> 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.

notice your loop there - you need to resolve the scope of these variables

        while ( my @row = .... ) { # just for the length of this loop

                        my $oid =                       # use it and blow it....

        }

when you get in the habit of this - you know that you have
done the scope of the variables that you really wanted - and then
you get to find where you are trying to redeclare a variable that
is still 'in scope' - but those are actually cuter error messages...

> 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.

look at line '17' - and ask yourself what a 'bare word' looks like
as opposed to say

        "TRUE" or 'TRUE'

in perl....

ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to