magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 2000 > 01 > Programming with Perl  

New News Is Good News

Well, the big news is that we survived that big new year, so let's take a look at what other news we can turn up. Many sites on the Net are now publishing frequently (even hourly) updated news information, and making machine-parsible news summaries using the XML document type definition called Rich Site Summary (RSS) format. This format was originally developed by Netscape to let users add news channels to My Netscape sites, but has since become adopted as the de facto standard for distributing headlines and brief descriptions of things that change around the Net.

Now, XML isn't hard to parse with Perl's massive text-wrangling abilities, but it's even easier to parse if we don't have to write much code. And just in time, my buddy Jonathan Eisenzopf hacked out a nice module called XML::RSS that can parse the various RSS files, as well as let you create ones of your own. So, I decided to whip up a little demonstration of this module.

Imagine a tool that goes out to various news sites once an hour or so (driven from cron), downloads new RSS data if something has changed, then pulls out only those headlines that you haven't seen already, sending you mail with just those updates. This tool brings together Web mirroring technology (via the LWP library), parsing of RSS files via XML::RSS, and then sending mail via Net::SMTP, all found in the CPAN (at www.cpan.org, and hundreds of other places). The code behind the tool is what we've got in



  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2