From owner-freebsd-questions@FreeBSD.ORG Wed Jan 25 18:30:03 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B833716A41F for ; Wed, 25 Jan 2006 18:30:03 +0000 (GMT) (envelope-from antennex@hotmail.com) Received: from hotmail.com (bay106-f8.bay106.hotmail.com [65.54.161.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7FA7043D86 for ; Wed, 25 Jan 2006 18:29:54 +0000 (GMT) (envelope-from antennex@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 25 Jan 2006 10:29:54 -0800 Message-ID: Received: from 65.54.161.200 by by106fd.bay106.hotmail.msn.com with HTTP; Wed, 25 Jan 2006 18:29:53 GMT X-Originating-IP: [65.68.247.73] X-Originating-Email: [antennex@hotmail.com] X-Sender: antennex@hotmail.com From: "Jack Stone" To: freebsd-questions@freebsd.org Date: Wed, 25 Jan 2006 12:29:53 -0600 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 25 Jan 2006 18:29:54.0217 (UTC) FILETIME=[56125990:01C621DD] Subject: Perl script help X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jan 2006 18:30:03 -0000 I'm using an old (2001) canned perl script to manage questions to my tech site. It is of big help since it can answer common questions from templates and a real time saver. Alas, that time saves is now being diminished by junk mail about cheap drugs and I'm trying to figure out how to filter those out of the good questions that are submitted by a form to a directory. I've managed to filter the copy that is sent via sendmail by procmail using these tests: * B ?? .*(cool|site|yousite|(yousite best)) * B ?? .*(http:\/\/.*\.*)|(//) However, that still leaves the original stored in the directory that are displayed when the admin program is loaded and the questions are matched by proper answer template. Is there any way to insert the same type of tests on those original copies in the storage as "*.ftf" files and just delete them so they aren't there when the question manager program is loaded?? I need a couple of perl lines that will either block or delete the questions if the body of the question matches the tests. Below are the pertinent lines of a sub-process that processes and stores the questions submitted via a web form --> ( http://www.antennex.com/cgi-bin/qm/Question.cgi ). ---------------------------------------------------------------------------- # if(open(QUESTION, ">$Data/questionfiles/$PID.ftf")) { # flock(QUESTION, '2'); # print QUESTION "name||$FORM{name}\nemail||$FORM{email}\n"; # print QUESTION "date||$SHOW_TIME on $SHOW_DATE||$time\n\n\n"; # 3 new lines # print QUESTION "$FORM{message}\n"; # close QUESTION; # backup("$Data/questionfiles/$PID.ftf"); # ...etc., etc. ---------------------------------------------------------------------------- Any suggestions appreciated.....!! Best regards, Jack _________________________________________________________________ Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/