use strict; use warnings;
...would show you that $m51 is not defined on line 39. This is probably a typo -- please use real code :D.
It is not clear what the script should be doing, other than rewriting all the ATOM lines, without field 4.
This snippet (reformatted for "standard" readability):
...tries to index @m3 by using one of its values. According to your regex, $m3 is \w{3}, so it will probably evaluate to index 0. Also, using "i" as an index should not compile.foreach $line (@m3,@m5){ if ($m3[$line] eq $m3[$line+1]) { $m5[i]=$m5[i+1]; } elsif ($m3[$line] ne $m3[$line+1]) { $m5[i+1]=$m5[i]+1; } }
Please show us your sample script, and a sample input and output (what you got, and what you really want). We can then walk you through this.
-QM
--
Quantum Mechanics: The dreams stuff is made of
In reply to Re: Rearrange the residue number of a pdb file according to the residues names
by QM
in thread Rearrange the residue number of a pdb file according to the residues names
by nastaziales
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |