in reply to Can't pass a hash ref to a a subroutine

You have given create_profile a prototype which demands it take no arguments. Remove the empty parens and the error will go away.

sub create_profile { my ($dbh, $profile_specs_ref) = @_; # . . . }

After Compline,
Zaxo