note
neniro
If you don't want to get all those values or keys, you could use <b>each</b> to get just the first pair:
<code>
#!/usr/bin/perl
use strict;
use warnings;
my $hoh = {
apples => { source => 'uk', colour => 'red', },
pears => { source => 'uk', colour => 'green', },
bananas => { source => 'uk', colour => 'yellow', },
};
my (undef, $v) = each %$hoh;
print $v->{'source'}, "\n";
</code>If you want to use <b>each</b> later in your script, remember to reset the iterator.
555478
555478