Hi,
Can you post the whole script. Possibly you have declared 'use strict' in your code or it has been set default. The problem is that the compiler is demanding explicit declaration of the variables that you have used.
declaring @shrimp as :
my @shrimp = <COO>;
and
foreach my $tuna (@shrimp)
{
   squid=substr($tuna,0,4);
   ...and so on
}

will eliminate the error.

Regards,
Suvajit


ZHAO, BING wrote:

Hi,
I am doing this simple enough script, but somehow it generates error:



open COO, "1898.inf" or die "Cannot open file 1898.inf:$!";
@shrimp=<COO>;

foreach @shrimp{
    $squid=substr($_,0,4);
    $shark=$_.".pdb";
    system "\rm dali.lock"; #ignore this part
    system "dalilite ~readbrk pdb1898/$shark $squid"; #ignore this part
}


Global symbol "@shrimp" requires explicit package name at ./pdbReadbrk2000.pl line 19.
syntax error at ./pdbReadbrk2000.pl line 21, near "foreach @shrimp"
Global symbol "$to" requires explicit package name at ./pdbReadbrk2000.pl line 21.


thank you all, what did I do wrong?

best,


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


  • Re: hi Suvajit Sengupta

Reply via email to