Hi
I am using perl
what My program does is it will take each line from a file and put it into an array variable. and from the array variable I am placing specific part in to another array.
the code is as follows
@output contains the part of the file I want.
foreach my $id(@output)
{
$pdbid=substr($id,8,3);
push(@arrpdb,$pdbid);
}
at the line where I am assigning the part of the string to the $pdbid
its giving me an warning that
substr outside of string at <fine name ><line number>.
in the same program I am retriving a part of the string to another variable.
foreach my $acc(@output)
{
$accno=substr(@output,36,3);
push(@arracc,accno);
}
here also its promting the same warning.
but my program works fine.
The other warning I am getting is uninitialised value in hash element.
Can anybody kindly help me to solve these warnings.
thanks a lot
I am using perl
what My program does is it will take each line from a file and put it into an array variable. and from the array variable I am placing specific part in to another array.
the code is as follows
@output contains the part of the file I want.
foreach my $id(@output)
{
$pdbid=substr($id,8,3);
push(@arrpdb,$pdbid);
}
at the line where I am assigning the part of the string to the $pdbid
its giving me an warning that
substr outside of string at <fine name ><line number>.
in the same program I am retriving a part of the string to another variable.
foreach my $acc(@output)
{
$accno=substr(@output,36,3);
push(@arracc,accno);
}
here also its promting the same warning.
but my program works fine.
The other warning I am getting is uninitialised value in hash element.
Can anybody kindly help me to solve these warnings.
thanks a lot