in reply to Using foreach on a hash passed to a subroutine

A hash of hashes already contains hash references, so you probably just have to pass $config{units}{myUnit}{interfaces}. Because now, it looks like you're actually passing a scalar reference to a scalar containing a hash reference.