Thread Prüfen, ob alle Dateien existieren (1 answers)
Opened by Shaq17 at 2015-07-06 13:11

GwenDragon
 2015-07-06 13:35
#181494 #181494
User since
2005-01-17
14533 Artikel
Admin1
[Homepage]
user image
Einfach so mit einem Hash "zählen":
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
my @list_UST = ( "192.168.17.4", "11.255.22.1", "10.256.17.13" );

my %found;

for my $ip (@list_UST) {
    $found{$ip} = glob("*_${ip}_*.log");
}
say "Gefunden: ", join ",", grep { $found{$_} } sort keys %found;
say "Fehlend: ", join ",", grep { !$found{$_} } sort keys %found;

Last edited: 2015-07-06 14:28:24 +0200 (CEST)
die Drachin, Gwendolyn


Unterschiedliche Perl-Versionen auf Windows (fast wie perlbrew) • Meine Perl-Artikel

View full thread Prüfen, ob alle Dateien existieren