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:

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:

… has been seeking P. F. Sloan, but no one knows where he has gone.

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:

While Sloan helped Webb get started on his career, it was because of a personal dispute with him that Webb denied the existence of "P.F. Sloan" when asked about the song's title character during an article interview, saying that he had made the name up. Ironically, this led Eugene Landy, the controversial psychologist, to lay claim to being the real P.F. Sloan when he was asked by reporters why he considered himself able to direct Beach Boys lead singer Brian Wilson's musical career. Landy claimed to have written the songs attributed to "P.F. Sloan", and this soon led to his losing his license.

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.


Last Modified 2012-10-08 7:57 PM EDT