Either do:
# Note the braces to force list context on the left hand side my ($roleid) = autocd::roles->search(rolename => $rolename);
or
my $role_iter = autocd::roles->search(rolename => $rolename); if (!$role_iter->count || !$username){ return ""; } my $roleid = $role_iter->first;
I'd go for the first option.
In reply to Re: Class::DBI insert error
by rhesa
in thread Class::DBI insert error
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |