Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> Perl >> Snippet

loop through a hash array #2


foreach $key ( keys %MyHash )              # 'keys %myhash' creates list of all keys
  { print "$key :$MyHash{$key} \n " ; }     # print each key, then its value