next up previous contents index
Next: Boolean Expressions (True and Up: Hashes Previous: Hashes   Contents   Index

In HTML you use the <dl> tag.

Each pair has a key, the <dt> tag, and a value, the <dd> tag.

    <html><head><title>Dictionary Lists</title></head>




        <dt>father</dt> <dd>Fred</dd>

        <dt>mother</dt> <dd>Wilma</dd>

        <dt>child</dt> <dd>Pebbles</dd>

        <dt>pet</dt> <dd>Dino</dd>




will look like:


In perl, the name of a hash starts with a ``%''.

    %flintstone = (

    "father" => "Fred",

    "mother" => "Wilma",

    "child" => "Pebbles",

    "pet" => "Dino",


To retrieve the value of a key:

    print "$flintstone{"pet"}\n";

will print:


Tom Hunt 2002-06-09