parse units file my accounts while my line ROLES my acc acc schule dss

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# parse units file
my @accounts;
while (my $line = <ROLES>) {
my %acc;
...
$acc{schule} = $dssDetails[1];
$acc{postalCode} = $dssDetails[3];
push @accounts, \%acc;
}
# parse units file
my @units;
while (my $line = <ROLES>) {
my %unit;
...
$unit{foo} = 'bla';
push @units, \%unit;
}
# print LDIF records
for my $acc (@accounts) {
for my $unit (@units) {
... access $acc->{schule}, $unit->{foo} ...
}
}