Help for this page

Select Code to Download


  1. or download this
    %hash=('A'=>1, 'B'=>2, 'C'=>3, 'D'=>4);
    
  2. or download this
    @keyarr=(keys (%hash));
    foreach (@keyarr)
    {print hash{$_}=>$_;
    
  3. or download this
    foreach $key (sort (keys (%hash)))
    {print "$key => $hash{$key}\n";}