#!/usr/bin/perl use strict; use warnings FATAL => 'all'; use v5.10; # activate say feature my $h1 = {'a'=>1, 'b'=>2, 'c'=>3, 'd'=>4,}; my $h2 = {'v'=>6, 'x'=>7, 'y'=>8, 'z'=>9,}; while( my ($k1, $v1) = each(%$h1)) { say "external $k1 => $v1"; while( my ($k2, $v2) = each(%$h2)) { say "internal $k2 => $v2"; } # getchar to pause iteration after inner loop print "getchar to pause iteration after inner loop\n"; my $c = <>; }