in reply to LogScripts.pm
in thread tracking files
Once again,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); }
|
---|