> Any ideas?? > ============================================================= > # !/usr/bin/
This should be #!/usr/bin/perl (no space between # and !, complete path to perl on your machine) > # !Monthly Access log reporting! > > chdir "/usr/netscape/server4/bin/https/lib" or die "Can't cd to > /usr/netscape/server4/bin/https/lib!\n"; > > $WORKDIR=`/webdata/perl/workarea`; > $LOGDIR=`/usr/netscape/server4/https-jcc/logs`; > $server=`jcc`; > $tf=$WORKDIR/tf$$; > $rf=$WORKDIR/rf$$; > $lf=$WORKDIR/lf$$; I'm not sure what you're doing here... Any rvalues that are a mix of variables to be interpolated and literal characters need to be double quoted by either using " or qq#stuff goes here#; (the # can be any character or set of braces) > > # !find last month > > $month = (localtime(time()))[4]+1; > > if ($month == 1) { $monthl = `Jan`; } > if ($month == 2) { $monthl = `Feb`; } > if ($month == 3) { $monthl = `Mar`; } > if ($month == 4) { $monthl = `Apr`; } > if ($month == 5) { $monthl = `May`; } > if ($month == 6) { $monthl = `Jun`; } > if ($month == 7) { $monthl = `Jul`; } > if ($month == 8) { $monthl = `Aug`; } > if ($month == 9) { $monthl = `Sep`; } > if ($month == 10) { $monthl = `Oct`; } > if ($month == 11) { $monthl = `Nov`; } > if ($month == 12) { $monthl = `Dec`; } Not a big deal, but you can use elsif instead of testing every condition every time, or perhaps just a reference array? Also, in perl, the backticks (``) execute a system call and return the output of that system call. I don't think that's what you want to do here... > $lognames=`find $LOGDIR -name "access.$monthl*" -exec echo > "-i" {} "\c" \;`; > > # all data > print '*' . $lognames; > print "ALL data">$rf; Does this work? I would think you would have to open a filehandle for writing in order to do that... > /usr/netscape/server4/extras/flexanlg/flexanlg -n $server -m > $lognames -c > huk -t u5h5 -l c15h15 -r -p ctl 2>&1 >> $rf; Looks like you want to use the system command to send that command to the operating system for execution. > # just html files accessed by off campus users > print "\n\n\n\nOff campus access, no 204 or 192 IP numbers">>$rf; Again, looks like a job for a filehandle. > find $LOGDIR -name "access.$monthl*" -print | > while read fn; > do > grep -v "^136" $fn > $tf; > grep -v "^192" $tf>> $lf; > done This looks like a mix of shell scripting and perl... If you want to look up documentation on perl functions, do perldoc -f <nameOfFunction> or perldoc -q <faqSearchTerm> or perldoc perltoc for a big list of stuff. Good luck! -dave END of Message -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]