John Doe\n
And your regex: /^\Q$student\E$/ will never match any line in that file, because it doesn't allow for the trailing newline. Thus, $student will always get printed, even if the name already exists. F
Dave
In reply to Re: Re: appending to a file
by davido
in thread appending to a file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |