in reply to Re: more than one condition to a while loop
in thread more than one condition to a while loop
while (my $line = <INFILE> && $line !~ /SEQ.../)
I'm usually suspicious of "my" inside conditionals. In this case, your code won't even compile under strict as you are trying to assign the value of
to my $line.<INFILE> && $line !~ /SEQ.../
Update: Your new version doesn't fix the problem:
still produces:
because my doesn't declare a variable until the end of the statement that it occurs in (as I understand it). - tyeGlobal symbol "$line" requires explicit package name
|
|---|