in reply to CAN YOU FIGURE THIS OUT?

If you can't figure it out, have you thought about asking the person who wrote it in the first place? If you have an actual question on how to do this in Perl, then you're going to get a lot more constructive advice if you show what you've attempted and where you're getting stuck or where you don't understand what is going on.

Useless trivia: In the 2004 Las Vegas phone book there are approximately 28 pages of ads for massage, but almost 200 for lawyers.