% This document was generated automagically by lgrind.  DO NOT EDIT.

\LGinlinefalse\LGbegin\lgrinde
\L{\LB{\C{}\V{\#}!\1usr\1interp\1perl -w}}
\CE{}\L{\LB{}}
\L{\LB{\C{}\V{\#} VARIOUS HASH EXAMPLES IN PERL}}
\CE{}\L{\LB{\C{}\V{\#} By Louis Ziantz}}
\CE{}\L{\LB{}}
\L{\LB{\C{}\V{\#} Description: This program is a demonstration of reading}}
\CE{}\L{\LB{\C{}\V{\#}              from STDIN into an array.}}
\CE{}\L{\LB{\C{}\V{\#} Procedure:   Several lines are read from input and}}
\CE{}\L{\LB{\C{}\V{\#}             the array is output several ways.}}
\CE{}\L{\LB{\C{}\V{\#} Input:       Lines of text from STDIN.}}
\CE{}\L{\LB{\C{}\V{\#} Output:      Array read from STDIN in several ways.}}
\CE{}\L{\LB{}}
\L{\LB{\V{\$a}\{345.2\}_=_456.5;\C{}_\V{\#} creates element 456.5 with key \"345.2\"}}
\CE{}\L{\LB{\V{\$a}\{\S{}\"aaa\"\SE{}\}_=_\S{}\"bbb\"\SE{};\C{}_\V{\#} creates element \"bbb\" with key \"aaa\"}}
\CE{}\L{\LB{\V{\$a}\{\V{ccc}\}_=_\S{}\"bBB\"\SE{};\C{}_\V{\#} creates element \"bbb\" with key \"aaa\"}}
\CE{}\L{\LB{}}
\L{\LB{\%\V{building}_=_(}}
\L{\LB{}\Tab{8}{_____\S{}\"CS\"\SE{},___\S{}\"Bahamas\"\SE{},}}
\L{\LB{}\Tab{8}{_____\S{}\"CS\"\SE{},___\S{}\"Amos_Eaton\"\SE{},}}
\L{\LB{}\Tab{8}{_____\S{}\"Math\"\SE{},_\S{}\"Amos_Eaton\"\SE{},}}
\L{\LB{}\Tab{8}{_____\S{}\"ECSE\"\SE{},_\S{}\"CII\"\SE{},}}
\L{\LB{}\Tab{8}{_____\S{}\"Arch\"\SE{},_\S{}\"Greene\"\SE{}}}
\L{\LB{}\Tab{8}{_____);}}
\L{\LB{}}
\L{\LB{\%\V{building}_=_(}}
\L{\LB{}\Tab{8}{_____\V{CS}___=\>_\S{}\"Amos_Eaton\"\SE{},___}}
\L{\LB{}\Tab{8}{_____\V{Math}_=\>_\S{}\"Amos_Eaton\"\SE{},}}
\L{\LB{}\Tab{8}{_____\V{ECSE}_=\>_\S{}\"CII\"\SE{},}}
\L{\LB{}\Tab{8}{_____\V{Arch}_=\>_\S{}\"Greene\"\SE{}}}
\L{\LB{}\Tab{8}{____);}}
\L{\LB{}}
\L{\LB{@\V{building}_=_\%\V{building};}}
\L{\LB{\C{}\V{\#} (\"ECSE\", \"CII\", \"Math\", \"Amos Eaton\", \"Arch\", \"Greene\", }}
\CE{}\L{\LB{\C{}\V{\#}  \"CS\", \"Amos Eaton\")}}
\CE{}\L{\LB{@\V{dept}_=_\K{reverse}(@\V{building});}}
\L{\LB{\C{}\V{\#} (\"Amos Eaton\", \"CS\", \"Greene\", \"Arch\", \"Amos Eaton\", }}
\CE{}\L{\LB{\C{}\V{\#}  \"Math\", \"CII\", \"ECSE\")}}
\CE{}\L{\LB{\%\V{dept}_=_@\V{dept};}}
\L{\LB{@\V{dept}_=_\%\V{dept};}}
\L{\LB{\C{}\V{\#} (\"CII\", \"ECSE\", \"Greene\", \"Arch\", \"Amos Eaton\", \"Math\")}}
\CE{}\L{\LB{}}
\L{\LB{\K{foreach}_\V{\$key}_(\K{keys}_(\%\V{building}))_\{\C{}_\V{\#} for each key of \%building}}
\CE{}\L{\LB{____\K{print}(\S{}\"Key_\$key_contains_\$building\{\$key\}.\2n\"\SE{});}}
\L{\LB{\}}}
\L{\LB{}}
\L{\LB{\K{while}_((\V{\$key},\V{\$value})_=_\K{each}(\%\V{building}))_\{\C{}_\V{\#} as above}}
\CE{}\L{\LB{____\K{print}(\S{}\"Key_\$key_contains_\$value.\2n\"\SE{});}}
\L{\LB{\}}}
\endlgrinde\LGend


