# Note the braces to force list context on the left hand side my ($roleid) = autocd::roles->search(rolename => $rolename);