Data Structures, Arrays, and Linked Lists

Dennis Faas's picture

I'm finally making some leeway on the web site transformation.

I spent a good part of this weekend working on a web script that is going to completely automate newsletter subscriptions and removals, plus allow me to manage changes in subscriptions so that I can *finally* implement a text-version of this newsletter. This solution will give readers the choice of receiving the Gazette twice or three times a week!

It took me about 8 hours to figure out how to dereference a multidimensional array which points to another array structure in PERL (a web script programming language). This is pretty technical stuff, I know. But it sure is cool to say something that technical, isn't it?

In techy-terms and even non-techy terms, what I just said in the above paragraph actually refers to a data structure also known as a Linked List.

Data structures are imaginary "blocks" which tie information together in some sort of hierarchy. In other words: a data structure is a information that is stored in memory (hard drive or RAM) and is somehow linked together. All information is related and forms one large structure.

What's a data structure look like?

A data structure can be anything, really. It just depends how the information is relevant to one another. One of the most popular data structures is a binary tree because it links parent and child together: all data is related. One very popular use of a binary tree is typically seen in Multi Level Market strategies (MLM's).

In comparison to a data structure, a linked list is similar to a binary tree in a way that the information is linked together. A program (such as a list-management web script) can read through related information quickly and easily with information that is linked together. This is referred to as traversing.

And that's what I've been doing.

I've been trying to figure out how to manipulate and manage a large list of user information, particularly, those who subscribe and remove themselves from our mailing list. And yes, all of the tricks I pull are using a linked list. And wouldn't you know it -- all of this talk about list management and data structures can all be tied together because what I'm really talking about is writing my own database program that runs on the web site!

So far I'm about 95% complete but there's just one thing that is stumping me: how to remove duplicates from a multidimensional array using a linked list in PERL. Actually, there's more to it than that -- but I think you've learned enough for today.

Rate this article: 
No votes yet