Bundled or Unbundled? Perl Programming Helps Decide.

Over the holidays, a few friends challenged us to video-game duels. We enjoyed them enough to want a game system of our own. A bit of on-line price comparisons turned up an interesting trend- the bundles seemed more expensive then buying items separately. Perhaps there's greater demand and price competition on simpler, single items? Nevertheless, there are a variety of bundles, controller packs, and accessories, and I was curious what the price range was for the various ways to assemble a given system.

What better way then Perl*. And it turns out the same program can be used to price anything with various parts assembled or not- or to plan a multi-city trip, showing the total cost difference between various modes of travel, lodgings, etc. The code below only uses one module not included in the standard distribution, "enum", and if you don't want to install it you can "use constant" instead to define the name-to-number mapping.