How did you determine that your while loop never gets executed?
Also, /[ARTEC]/ likely does not match what you expect it to match, given your input file. See perlre about character classes. Most likely, you wanted /^\[ARTEC\]$/.
In reply to Re: search and replace pattern inside file not working as expected
by Corion
in thread search and replace pattern inside file not working as expected
by matze77
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |