in reply to Re: Re: first "project"
in thread first "project"
Ok I see you are running a perl module interface to clamav
I'm talking about running the clamscan program itself directly:use Mail::ClamAV qw/:all/;
or something using Tk::Fileevent like:my $results = `clamscan $dir`;
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: first "project"
by phenom (Chaplain) on Jun 11, 2004 at 02:03 UTC |