Hacks
I hack Perl. I have done it for money. I have done it for love. It's a great language, and it is a language that does what I want without too much pushing.
Here are a few of my favorite short programs.
-
check_rss.pl- Takes a URL for an RSS feed and prints a list of headlines. Good for when you're in text mode and don't want to pull up a browser to check the news of the day. -
m3uGen_date.pl- This program starts in your MP3 directory and makes a playlist of the newest songs. M3U playlists are the easiest of all possible data structures for these things; it's just a list of files separated by newlines. But still, incredibly useful. -
m3urand.plandm3urand_setup.pl- This is a pair of matched programs (joined with a .cgi that's strikingly similar to the first.m3urand_setupgoes through the filesystem and saves the url path into a DBM file.m3urandloads that DBM, makes an array from the keys, then chooses randomly until you have 120 minutes (from the old MTV alt-rock show) or your choice of minutes of music. I should really have more of a drop-back system in case we can't fine exactly 120 minutes (give or take a few seconds)but it works for my purposes so far. The big reason for the separation of the two parts is to keep the user from waiting for the file-system search, because that kinda sucks time. Notably faster when you split it up. -
rot_13.pl- Code that encodes and decodes ROT13 encryption. The only practical use oftr///that I've seen.
Comments, corrections and requests are greatly appreciated.