eliminate repetitious message(perl)

They have: 27 posts

Joined: Jan 2002

control+c and then control+v seems very easy for people leaving repetitious message or word when post their message in guestbook
so,
can any one tell me how to get rid of message appearing one more times(in perl) or suggest me a free script that I can learn from it..

Thanks...

He has: 32 posts

Joined: Mar 1999

You might try to log your messages to a logfile and compare a new message against this file.

They have: 601 posts

Joined: Nov 2001

You could do this in Perl quite easily.

$string =~ s/\b(\S+)\b(\s+\1\b)+/$1/
'

They have: 27 posts

Joined: Jan 2002

Thanks....
Seemingly, I have seen the method from a book but I cannot remember it ...

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.