in reply to Cannot find the error
condition (the regex is equivalent to /^t/, BTW). It's located inside the YES-branch of the$row =~ /^[t]/
but the end of the previous section sets $newsection to 1, so this condition can't be reached.if ($newsection <= 0)
I'd move the /^t/ condition into the ELSE part of the outermost if, and initialize $newsection with 1 at the very start.
Also, I miss strict and warnings.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Cannot find the error
by gudmo (Novice) on Apr 03, 2020 at 14:01 UTC | |
by choroba (Cardinal) on Apr 03, 2020 at 14:04 UTC | |
by gudmo (Novice) on Apr 03, 2020 at 14:19 UTC | |
by choroba (Cardinal) on Apr 03, 2020 at 14:38 UTC |