Aug 23, 2012, 1:37 PM
Re: [GeneticsGirl] Help outputting first and last positions of blocks of the same type
a few things that will make your code simpler.
To start with, use the following pragmas:
That will give you a lot of indications on possibly wrong code.
Second, your long list of declarations could be simplified:
my ( $pos, $V_GT, $I_GT, $type @array, ...};
my $line = $_;
@array = split (/\s/, $line);
could be rewritten as follows:
@array = split;
@array is a poor name for an array. Try instead to use a name that correspond to the contents.
I do not have time right now to suggest a proper algorithm, but if that can wait for the weekend, I guess I could supply you with the basis of what you need.
(This post was edited by Laurent_R on Aug 23, 2012, 1:41 PM)