my $i; my @final_gset = (); LOOP: while (<IN>) { if (/POLY/) { $final_gset[$i] = <IN>; $i++; next LOOP; } } close (IN); open (TEXT, ">>test.txt") or die "Can't create test.txt: $!\n"; foreach $_(@final_gset) { print TEXT "$_"; } close TEXT;
In reply to Re: Re: while loop not working
by harry34
in thread while loop not working
by harry34
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |