Leser: 27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl
use warnings;
use strict;
use Data::Dumper;
my %Studenten = ();
my $i = 1;
if ($i) {
#hier soll der HoH hinein
}
print Dumper($Studenten);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/usr/bin/perl use warnings; use strict; use Data::Dumper; my %Studenten = (); for my $i ( 1 .. 2 ) { my $Semester = $i * 2; $Studenten{ "Gruppe$i" } = { Semester => $Semester, MatrNr => '125', Vorname => 'Vorname', }; } print Dumper(\%Studenten);
1 2 3 4 5 6 7 8 9 10
my %stud; %stud = ( Gruppe1 => { Name => "Otto", MNr => 1234,}, Gruppe2 => { Name => "Anna", MNr => 4321,}, );