The unless ($found) check needs to be after the while loop, not within (before having run through the entire file, you cannot tell whether a matching entry was found...)
In reply to Re^4: Accessing a file from the perl
by Eliya
in thread Accessing a file from the perl
by abcdefg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |