Quite directly, because you've opened the filehandle ADDRESS for writing, and then you try to read from it, as busunsl points out:
open (ADDRESS, '>> addbook.txt') or die "Can't open file; $!" ; while (<ADDRESS>) { # ...
Your while loop terminates immediately.
dmm
If you GIVE a man a fish you feed him for a dayIn reply to Re: Why does this code quit?
by dmmiller2k
in thread Why does this code quit?
by ellem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |