printf NFILE "$item\n";
should be
printf NFILE "%s\n", $item;
or
print NFILE "$item\n";
The "f" in "printf" stands for "format" (not "file"), and you didn't provide one.
In reply to Re: Escaping special chars to add in a file
by ikegami
in thread Escaping special chars to add in a file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |