User Tools

Site Tools


kurs:hash_ref.pl
use strict;
use warnings;
use Data::Dumper;

my $teilnehmer = {
  guenther    => {alter => 27, 
                  groesse => 188,
                  },
  christian   => {alter => 22, 
                  groesse => 175, 
                  schulen => ['vs', 'gym', 'uni'],
                 },
  mario       => {alter => 26, 
                  groesse => 182,
                  },
  martin      => {alter => 26, 
                  groesse => 170,
                  },
  joachim     => {alter => 30, 
                  groesse => 173,
                  },
  rudi        => {alter => 23, 
                  groesse => 175,
                  },
  fritz       => {alter => 50, 
                  groesse => 174,
                  },
  dennis      => {alter => 27, 
                  groesse => 188,
                  },  
  mark        => {alter => 32, 
                  groesse => 174,
                  },
  gerhard     => {alter => 26, 
                  groesse => 185,
                  },
  daniel      => {alter => 21, 
                  groesse => 175,
                  },
  harald      => {alter => 22, 
                  groesse => 190,
                  },
  stefan      => {alter => 31, 
                  groesse => 188,
                  },
  };

 print Dumper $teilnehmer;

# printf "%s\n", $teilnehmer->{christian}->{alter};
kurs/hash_ref.pl.txt · Last modified: 2014/09/10 21:22 (external edit)