Perl Programming Assist Please

|


I'm going crazy here, my brain apparently fried from the weekend or the water or something, looking for some perl assistance from my perl-knowledgeable buds (you know who you are... :)

I'm creating a menu system and converting entries in a database into a perl data structure that I can then parse to create an HTML menu. I'm having a real problem with the first part. I want to take a list of strings such as:

/about/contact
/about/contact/map
/about/contact/email
/about
/products
/products/style1
/products/style2
/products/widgets
/products/widgets/foo
/products/widgets/bar
/products/widgets/baz
/products/widgets/baz/qux

(The strings can have infinite depth (not restricted to 3 or 5 sub-levels) and is dynamically pulled from a database.)

I want to take this and convert it into a datastructure such as this one here (which is part of HTML::Widgets::NavMenu).

The gory details are a bit.... gorier. The strings are just an element of an object created out of the database, and the 'path' is actually a list of numbers (/1/2/3) but this seemed easier to work with.

This stuff used to be simple.... argh, embarrassed :(

About this Entry

This page contains a single entry by Arcterex published on March 5, 2007 8:05 PM.

Snow?!? was the previous entry in this blog.

Updating the Hard Drive on your Mindstor Digital Wallet is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.25