Perl script help

Jack Stone antennex at
Wed Jan 25 10:30:03 PST 2006

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:\/\/.*\.*)|(/<a href=*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 -->  ( ).
# 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 
#   print QUESTION "$FORM{message}\n";
#   close QUESTION;
#   backup("$Data/questionfiles/$PID.ftf");
# ...etc., etc.

Any suggestions appreciated.....!!

Best regards,

Don’t just search. Find. Check out the new MSN Search!

More information about the freebsd-questions mailing list