in reply to How to Save a variable outside of a loop

As well as the re-declared variables, it looks like you have a typo on the line:

if($hitlength == $prev_l and $prevalence == $prev_l){

This should probably be:

if($hitlength == $prev_l and $prevalence == $prev_p){

Replies are listed 'Best First'.
Re^2: How to Save a variable outside of a loop
by Calebros (Initiate) on Jul 31, 2015 at 22:12 UTC
    You are indeed correct, thank you very much!