On that note, lets go off into word matching -

On Tuesday, September 17, 2002, at 10:15  PM, Erich Markert wrote:
> I've been doing searches for mod_perl & non-mod_perl based 
> solutions but haven't found anything (lot's of content management 
> but no document management).

Here is an example of word matching:


#!C:\perl\bin\perl.exe
#!/usr/bin/perl

# A Perl filter that will take the selected text, sort the
# words, put into a column, remove duplicates, then output a
# word count by each.

use strict;

my %count;

while (<DATA>) {
    for my $word (split) {
      next unless $word =~ /\w/;
      $word =~ s/^\W+//;
      $word =~ s/\W+$//;
      $count{lc $word}++;
    }
}

for my $word (sort keys %count) {
    print "$word $count{$word}\n";
}

sleep 30;

__END__
Dr. Seuss's Guide to the Internet
(with apologies to Dr. Seuss and you sheep)

Here's an easy game to play.
Here's an easy thing to say.

If a packet hits a pocket on a socket on a port,
And the bus is interrupted as a very last resort,
And the address of the memory makes your floppy disk abort,
Then the socket packet pocket has an error to report!

If your cursor finds a menu item followed by a dash,
And the double-clicking icon puts your window in the trash,
And your data is corrupted 'cause the index doesn't hash,
Then your situation's hopeless, and your system's gonna crash!

You can't say this? What a shame, sir!
We'll find you Another game, sir.

If the label on the cable on the table at your house,
Says the network is connected to the button on your mouse,
But your packets want to tunnel on another protocol
That's repeatedly rejected by your printer down the hall,

And your screen is all distorted by the side effects of Gauss,
So your icons in the window are as wavy as a souse,
Then you may as well reboot and go out with a bang,
'Cause as sure as I'm a poet, the sucker's gonna hang!

When the copy of your floppy's getting sloppy on the disk,
And the microcode instructions cause unnecessary RISC,
Then you have to flash your memory and you'll want to RAM your ROM.
Quickly turn off the computer and be sure to tell your mom!


No, I didn't start this code, but I changed the data to protect the 
innocent...

Cheers!
-Bill- :]
____________________________________________________________________
WC -Sx- Jones * Lead e-Systems Developer * http://insecurity.org/
FCCJ * 501 W State St * Jacksonville, FL 32202 * 1 (904) 632-3089
     __ __                      __ __         __
    / // /__ ____  ___  __ __  / // /__ _____/ /_____ ____
   / _  / _ `/ _ \/ _ \/ // / / _  / _ `/ __/  '_/ -_) __/
  /_//_/\_,_/ .__/ .__/\_, / /_//_/\_,_/\__/_/\_\\__/_/
           /_/  /_/   /___/
          Running LinuxPPC UltraPenguin SuSE 7.3 (-Sx-)
        __ _                     http://jacksonville.pm.org/
       / /(_)_ __  _   ___  __   http://cis4dl.sf.net/
      / / | | '_ \| | | \ \/ /   http://www.suse.com/
     / /__| | | | | |_| |>  <    http://www.perl.com/
     \____/_|_| |_|\__,_/_/\_\   http://www.fccj.edu/

Reply via email to