in reply to LogScripts.pm
in thread tracking files

Thank you all!
++'s around for all great answers!
BBQ : I agree with you, but switching is not an option. Got to deal with the tools you are given sometimes.

$code_or_die: Very informative! I will definitely check out the software.
Fastolfe: Perfect! I think that was exactly what I was looking for. I couldn't use $0 because the difference between 90% of the scripts is the script path (and thats about it) so i tweaked it abit to the following:
package LogScripts; # use Time::HiRes qw{ time }; use File::Spec::Functions qw(rel2abs); my $started; my $path; BEGIN { open(F, ">>c:\\scripts.log"); $path = rel2abs($0); $started = time(); print F localtime(time) . " $ENV{REMOTE_ADDR} - Starting $path\n"; } END { my $elapsed = time() - $started; print F localtime(time) . " $ENV{REMOTE_ADDR} - Stopping $path ($el +apsed seconds)"; close(F); }
Once again,
thank you all:) I learned a good deal from everyone.