subunit.pm: Simplify subunit handling in perl.