Not sure how many people actually use this, but those of you on Firefox would have noticed the above does not actually work correctly any more. It always goes to perlmonks home page and never does a search. It does work fine on Mozilla Seamonkey though. I finally traced this to a slight difference in how it works in Firefox and Seamonkey. Below code does seem to work on both. I had to split the %s into two strings in the comparison with variable s to stop firefox from trying to replace it.
A corresponding one for Perl documentation