Tim's IT-Blog

Just a blog about IT and IT-Problems…

HowTo find chinese or russian Spam encoded in UTF-8 with SpamAssassin (Chinese Russian Spam filter rules)

by admin_import on 03/06/2010

Normally SpamAssassin do not support UTF-8 by performance reasons: If it contains “utf8”, then that’s probably the problem. Change it so it does not contain “utf8” …, and the performance issues will clear up. Perl 5.8 uses Unicode character sets internally in this situation, and unfortunately, this greatly hurts performance of all Perl code which […]

Shell: Find and Repleace String over many files with Perl

by admin_import on 03/05/2010

From: http://snippets.dzone.com/posts/show/116 An equivalent of the other find-replace, except it’s a one-liner that generates no temp files, and is more flexible: perl -pi -e ‘s/find/replace/g’ *.txt Or, to change matching files in a hierarchy: find . -name ‘*.txt’ |xargs perl -pi -e ‘s/find/replace/g’ That didn’t work when the file names contained white space. This seems […]