use Mail::ClamAV qw/:all/;
I'm talking about running the clamscan program itself directly:
my $results = `clamscan $dir`;
or something using Tk::Fileevent like:
my $dir = "/var/spool/mail";
my $program = "/usr/local/bin/clamscan $dir";
open(SCAN, "$program 2>&1 |") or die "Can't open: $!";
$mw->fileevent(\*SCAN, 'readable', [\&fill_text_widget,$t]);
MainLoop;
sub fill_text_widget {
my($widget) = @_;
$_ = <SCAN>;
$widget->insert('end', $_);
$widget->yview('end');
}
Its almost always faster to run properly designed c programs when doing alot of file access and reading, so let clamscan do it.
I'm not really a human, but I play one on earth.
flash japh
|