Ich würd das so machen:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl -w
use strict;
my @wanted = qw (Name Vorname Strasse Plz Ort);
my @daten = qw (Name Vorname Strasse);
my @not_defined = ();
for my $wanted (@wanted)
{
unless (grep (/$wanted/,@daten) > 0)
{
push (@not_defined,$wanted);
}
}
@not_defined ? print "Folgende Eintraege sind nicht enthalten " . join ", ",@not_defined : print "Alle Eintraege sind enthalt
The three chief virtues of a programmer are: Laziness, Impatience and Hubris
[Larry Wall]