If the script produces a report, then include in the report output, the name of the script that created it (you can usually use $0
), the time it was created (use scalar(logtime())
), whom to contact for further information and/or who ran the
script (scalar(getpwuid($<))
). It is also good to include the name of the host that ran the script. One way to do this is:
use Sys::Hostname; #use Socket; my $ipaddr=gethostbyname(hostname()); my ($a, $b, $c, $d)=unpack('C4',$ipaddr); my ($hostname,$aliases, $addrtype, $length, @addrs)=gethostbyaddr($ipaddr,2);