in reply to Bioinformatics- Use of uninitialized value
only checks the i'th element of the @second_fragments array, and $i is associated with @first_fragments. Perhaps you meantmy @third_fragments = grep !/$rsite3/, $second_fragments[$i];
my @third_fragments = grep !/$rsite3/, @second_fragments;
Also, you should be aware that the vast majority of your scalar invocations are unnecessary. <, - and most other operators enforce scalar context already. And you can count from the end of an array using negative indices, thus you could have written e.g.
$first_fragments[-1] = $rsite1.$first_fragments[-1];
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Bioinformatics- Use of uninitialized value
by mlsmit10 (Initiate) on Jul 21, 2014 at 21:51 UTC |