Strict and consistent indentation are the first things I would change. Also you should have empty lines only at places where you want a visual separation. In short your code makes a very bad first impression
Also you have one long meandering procedure which is not easy to read. Refactor your code into subroutines, in your case you might put the list,add and delete functions into separate subroutines.
The .*$ at the end of the first regexp is useless.
You don't seem to have any use for your ID. And if your phone book never has more than a few 1000 entries you could always read the complete database into memory, into an array and have the index as id number. If it might get bigger you should use a real database engine.
In reply to Re: Phone Book
by jethro
in thread Phone Book
by h4ckroot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |