#!/usr/bin/perl
#
# eg12: hash ref example
#
use strict;
use warnings;

my %hash = ( "duncan" => "d.white", "bilbo" => "b.baggins" );
my $ref = \%hash;
$ref->{frodo} = "f.baggins";   # stores a new key, value pair
while( my($key,$value) = each(%$ref) )# now print all pairs out
{
      print "$key => $value\n";
}
