in reply to Why does this code quit?
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 day
|
|---|