in reply to Reset a vairable inside a for loop inside a while loop
One way to do it would be to get rid of the if statement altogether. You can instead structure your code like this:
my $x=0; for (my$a=0; $a<10; $a++) { open (file); # Read the column headers my $line = <file>; print $header, "\n"; my @keys = split /\t/, $line; # Process the data while ($line = <file>) { # The stuff inside the original else clause *Does some filtering as each line is read in* } }
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|