You are re-using too many variables, $lastchain in particular.
--Bob Niederman, http://bob-n.com$found = 0; while ($line=<INFILE>) { chomp $line; if ($line=~/^COMPND[\s]{3}3/) { $found = 1; # other processing here; } } $lastchain = '@' unless $found;
All code given here is UNTESTED unless otherwise stated.
In reply to Re: otherwise condition
by bobn
in thread otherwise condition
by anchorite
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |