my %newhash = ( accesslevels => { func1 => $oldhash{function}{func1}{content}, default => $oldhash{function}{default}{content} } );