in reply to How to control the loop

Your English is a little confusing, but I can see three errors from a quick glance:
next until ($seed=~/[ACGTN-]/ && (!($seed =~ /\$seed/))) { # should be: next unless ($seed=~/[ACGTN-]/ && (!($seed =~ /\$seed/)));
And there's also a problem with the second half of that statement:
(!($seed =~ /\$seed/)));
That's always going to evaluate as true - assuming $seed is never '$seed' - ie you're looking to match a literal by escaping the $. And if you meant to interpolate it, it will always be false because $seed always matches $seed ??

Please clarify. Also:

$i=$i+1; }until($i>682);#Line 29
Delete this - your initial for loop covers the condition.

If you clarify what you are trying to do and supply some sample data input and expected output, that would help.

cLive ;-)

--
seek(JOB,$$LA,0);