in reply to otherwise condition
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: otherwise condition
by anchorite (Initiate) on Aug 25, 2003 at 14:02 UTC | |
by dragonchild (Archbishop) on Aug 25, 2003 at 14:21 UTC | |
by menolly (Hermit) on Aug 25, 2003 at 18:30 UTC |