fork download
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. my %hash = (a=>5,b=>6);
  5. while (my ($key, $value) = each %hash) {
  6. print "Key is $key, value is $value\n";
  7. }
Success #stdin #stdout 0s 3696KB
stdin
Standard input is empty
stdout
Key is a, value is 5
Key is b, value is 6