10 entries, 1 page |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package: (so ähnlich hab ich des zur zeit)
#liest das file und speichert ergenis in hash
sub Opn2 {
my $Objekt = shift;
my $Datei = shift;
%haServers = ();
open(RRD,$Datei) or die "Could not read $rrdFile.\n";
my @lines = <RRD>;
foreach $currentLine(@lines){
if($currentLine =~ /\w/){
@NewServer = split(/;/,$currentLine);
$haServers{$NewServer[0]} = $NewServer[1];
}
print "$haServers{'chr7ca43'}<br>";
return (%haServers);
}
1
2
3
4
5
6
7
8
9
10
11
12
open(RRD2,"rrd_srv.txt") or die "Could not read $rrdFile.\n";
while (<RRD2>){
$currentLine = $_;
print "current line: $currentLine<br>";
if($currentLine =~ /\w/){
@NewServer = split(/;/,$currentLine);
$haServers{$NewServer[0]} = $NewServer[1];
}
return (%haServers);
}
close(RRD2);
while (my $currentLine = <RRD>) {
open(RRD,$Datei) or die "Could not read $rrdFile.\n";
open(RRD,$Datei) or die "Could not read $Datei: $!\n";
10 entries, 1 page |