It's been four years since our first post.
It's a chance to thank you for reading, and thanks to
the folks who link to our content. And also thanks to
our official, and still totally uncompensated, mascot,
Ms. Cathy
Poulin. She's cut down her appearances in the Bob's Discount
Furniture TV commercials, but she's still doing good
work.
Blogiversary IV:
Pun Salad Makes Wikipedia; More Perl Geekiness
Not that I sit up nights and ponder my referrer logs, but I noticed an odd one today: the Wikipedia entry for songwriter P. F. Sloan. And sure enough:
- https://punsalad.com/ The punsalad blog references P.F. Sloan.
Well, … sometimes. If you keep an eye on the subtitle under "Pun Salad" at the top of the page, you'll notice it changes from time to time. Specifically: the subtitle on the primary page at punsalad.com changes whenever the page changes; clicking permalinks or archive links generate pages on the fly, and they get a random subtitle.
The subtitle is picked via a standard Perl idiom that
chooses a random line from a text file (here called subheads
):
open( F, "<subheads" ) || die "Can't open subheads: $!\n"; while (<F>) { rand($.) < 1 && chomp( $subhead = $_ ); } close(F);After that bit of code, the
$subhead
variable contains the
chosen random line.
There are (as I type) currently 46 possible subtitles, so you have about a 2% chance (1/46) of seeing the one referred to by Wikipedia:
This is a reference to an old Jimmy Webb song, described in the Wikipedia article as a "catchy, bittersweet composition, which seems to be about the costs and disappointments of being a creative groundbreaker." Yeah, I guess; I just like the song (you can probably give it a listen here). Wikipedia also describes some weirdness associated with it:
P. F. Sloan wrote some pretty decent songs, but he also wrote "Eve of Destruction", a three minute and thirty-eight second demonstration of how stupidly self-righteous the 1960s were.