in reply to Re: foreach in HoHoA problems
in thread foreach in HoHoA problems
And you're right, I want to be iterating over the indices of the array, not the values. I certainly hope there aren't 7 million elemnts in the array! I think 70 is far more than I am expecting. As for you're suggestion of:
foreach my $index ( 0 .. $#array )
Would I have to write that as:
foreach my $index ( 0 .. $#matches{$fastaseq}{$sitekey} )?
As for undefined elements, I don't expect I'll see any. In a previous subroutine, I am pushing the positions of matches to an m// into the arrays in question, (that's what the 7 million coresponds to), so I expect all array elements will be numerical. Whether or not the array is undefined, however, depends entirely on whether or not m// came back as true. That's why I threw the if (@) in there.
Thanks.
Matt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: foreach in HoHoA problems
by graff (Chancellor) on Oct 28, 2006 at 21:53 UTC |