Click here to Skip to main content
13,592,944 members
Click here to Skip to main content
Add your own
alternative version


5 bookmarked
Posted 12 Apr 2006
Licenced GPL3

A simple address book application in Perl

, 12 Apr 2006
Rate this:
Please Sign up or sign in to vote.
This article includes a simple address book application in Perl.

Sample Image


Implements an address book using Perl's OOP capabilities. This provides facilities inluding searching, sorting, format printing, array manipulation, and I/O.


This project was inspired by an article submitted on the CodeProject website:

Using the code

There are two dependent files.

  • - This is where the Entry object is defined.
  • addressbook.txt - The database in a flat file. I was going to implement XML but did not have time.

Perl OOP

To use the Entry construct, include the pm file as shown below. This is demonstrated in the project. This project does not completely follow a OOP design. I only had a short period of time to implement this project, but the end result is definitely interesting. I hope it helps beginner Perl programmers to see the nice REGEX capabilities as well as how to integrate OOP into your design. Once again I would suggest visiting Khurt Williams' article page first if OOP in Perl is what you desire to learn.

package Entry; 

Sample Formatted Sorting Results

First Name: Arthur                   Last Name: Putie Home 
Phone: 923-835-8745                  Mobile Phone:923-812-6789 
Address: 23 Wimp Lane, Kensington    Zip code: 38758 
DOB: 8/31/69                         Salary: 126000.00 

First Name: Popeye                   Last Name: Sailor 
Home Phone: 156-454-3322             Mobile Phone: 156-445-4564 
Address: 945 Bluto Street, Anywhe Zip code: 29358 
DOB: 3/19/35                         Salary: 22350.00 

First Name: Michael                  Last Name: Vasquez 
Home Phone: 555-555-5555             Mobile Phone: 562-554-4545 
Address: 1 Perl ave Pomona Ca        Zip code: 90340 
DOB: 12/1/1976                       Salary: 100000.00

Perl is Cool

The main thing that I enjoyed about learning Perl was the fact that I could create some meaningful code fast. Also, I found that Perl could be developed for reuse and still be fast to implement.


This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


About the Author

Michael Vasquez
Software Developer
United States United States
No Biography provided

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web04-2016 | 2.8.180618.1 | Last Updated 12 Apr 2006
Article Copyright 2006 by Michael Vasquez
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid