#!/usr/bin/perl -w use strict; my %h = (1 => "one", 2 => "two"); %h = (%h, 3, "three"); %h = (%h, 4, "four"); print "h is:\n",printhash(%h); sub printhash { my $i = 0; join("",map { $_.($i++%2?"\n":" => ") } @_); }