Hi, I have to do some log processing with webalizer and tried to do the following:
#!/usr/bin/perl use strict; use warnings; opendir(DIR, "/Users/jan/Sites/apache_logs") or die "Cannot open directory"; while (defined(my $file = readdir(DIR))) { if ($file =~ /^www/) { print "Processing $file ... \n"; system ("webalizer", "-c ./webalizer.conf", "/Users/jan/Sites/apache_logs/$file"); } } closedir(DIR); webalizer complains that it cannot find the configuration file (provided via the -c parameter). But when I issue webalizer -c ./webalizer.conf /Users/jan/Sites/apache_logs/www.20040215 in bash, the configuration file is found without a problem. Why is that? My system syntax should be correct - and webalizer does recognize the filename. The configuration file is in the same directory as the Perl script. But in any case, the problem persists if I specify an absolute path to the configuration file within the script. Grateful for any hint, Jan -- There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence. - Jeremy S. Anderson -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>