#!/usr/bin/env perl use strict; use warnings; my %hash = ("fred" => "flintstone", "dino" => undef, "barney" => "rubble", "betty" => "rubble", ); printf "%10s\t=>%10s\n", "keys", "values"; for ( keys %hash ) { printf "%10s\t=>%10s\n", $_, $hash{$_} // ''; }