##
processInterfaceData(\$config{units}{yourUnit}{interfaces}, \%yourUnitIfs);
processInterfaceData(\$config{units}{anotherUnit}{interfaces}, \%anotherUnitIfs);
####
sub processInterfaceData
{
my ($h, $nh) = @_;
print "$key\n"
foreach my $key (keys %{$h});
}