Leser: 11
1 2 3 4 5 6 7 8
sub GetMonitorFilename{ my $hostname = shift || "localhost"; my $job = shift || "UNDEF"; my $name_of_this_machine = (gethostbyname ($hostname))[0]; $name_of_this_machine =~ tr/./$/; # das ist Zeile 50 return POSIX::strftime("%Y-%m-%d", localtime)."_".$name_of_this_machine."_".uc($job).".log"; }#end-GetMonitorFilename
QuoteUse of uninitialized value in transliteration (tr///) at C:/strawberry/perl/lib/
EBL/ebl.pm line 50.
Use of uninitialized value $name_of_this_machine in concatenation (.) or string
at C:/strawberry/perl/lib/EBL/ebl.pm line 51.
use Socket;
QuoteThese routines are the same as their counterparts in the system C library. In list context, the return values from the various get
routines are as follows:
($name,$passwd,$uid,$gid,
$quota,$comment,$gcos,$dir,$shell,$expire) = getpw*
($name,$passwd,$gid,$members) = getgr*
($name,$aliases,$addrtype,$length,@addrs) = gethost*
($name,$aliases,$addrtype,$net) = getnet*
($name,$aliases,$proto) = getproto*
($name,$aliases,$port,$proto) = getserv*
(If the entry doesn't exist you get an empty list.)
QuoteDann verstehe ich das nicht!
1 2 3 4 5
use Socket; $packed_ip = gethostbyname("www.perl.org"); if (defined $packed_ip) { $ip_address = inet_ntoa($packed_ip); }