Benutzer-Werkzeuge

Webseiten-Werkzeuge


perl_array_of_hashes

Dies ist eine alte Version des Dokuments!


Array of Hashes

Erstellung eines "Array of Hashes"

@AoH = (
    {
       husband  => "barney",
       wife     => "betty",
       son      => "bamm bamm",
    },
    {
       husband => "george",
       wife    => "jane",
       son     => "elroy",
    },
 
    {
       husband => "homer",
       wife    => "marge",
       son     => "bart",
    },
  );

Hinzufügen eines hash zum array:

push @AoH, { husband => "fred", wife => "wilma", daughter => "pebbles" };

Quellen

perl_array_of_hashes.1545297370.txt.gz · Zuletzt geändert: 2018/12/20 10:16 von admin