80: my ($lines, @masses, @names, @charges, @resnames, @respt, $symbol);
99: for ($lines=$pointers{respt}[0]; $lines<=$pointers{respt}[1]; $lines ++) {
100: push @respt, (unpack (("A8" x (length($file[$lines]) / 8)), $file[$lines]));
101: }
104: my ($n, $r) = (0, 0);
105: for $n (0 .. $#masses) {
109: if ($n == ($respt[$r]-1)) {
110: $r++;
111: }
You're confusing declaration and initialization. @respt is declared in line 80, but likely, not all elements of @respt are initialized in line 99, or rather, not enough elements. To further debug this, print out the number of elements in @respt:
#line 102 print "Elements in \@respt: ", scalar @respt;
perlmonks.org content © perlmonks.org and Corion, Fisch
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03