By declaring your variables inside the loop, they are being redeclared each time the loop executes.
If you move your declarations before the loop, it should work:
#!/usr/bin/perl use warnings; use strict; my $hitlength; my $prevalence; my $prev_l; my $prev_p ; while(<>){
In reply to Re: How to Save a variable outside of a loop
by RonW
in thread How to Save a variable outside of a loop
by Calebros
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |