I've often wondered why there's no fulltext search for the FAQ's and why -q
just searches the question headers.

I suppose there is a very good reason for that and I'll slap my forehead
once I've been told about it, but for my own purposes a fulltext search is
handy, so I implemented it as the -Q option. At [0] is the hacked version of
the perldoc.bat that comes with ActivePerl. I hope I haven't broken any
copyrights by modifying and distributing it, but as far as I can tell, it
should be alright.
Applying the changes to the perldoc that comes with other versions of Perl
should be easy enough for anybody on this list, but to make it a little bit
easier, you can find a diff -u of the original and the hacked version at the
same place I put the full batch file. [1]
Just in case I've done something bad by putting the code on that website, I
haven't linked it anywhere but below. I'll be quick to pull it off the
server if I have to.

[0] http://steffen-mueller.net/perldoc/perldoc_2.0.4.bat
[1] http://steffen-mueller.net/perldoc/perldoc_2.0.3_2.0.4.diff

Hope this is considered useful.

Steffen
--
@n=(544290696690,305106661574,116357),$b=16,@c=' ,JPacehklnorstu'=~
/./g;for$n(@n){map{$h=int$n/$b**$_;$n-=$b**$_*$h;$c[@c]=$h}c(0..9);
push@p,map{$c[$_]}@c[c($b..$#c)];$#c=$b-1}print@p;sub'c{reverse @_}

Reply via email to