in reply to Uninitialized Value in Sort

Some or more of the return values of BPP::ACCOUNT->getActiveUser($activeuser); do not have a $retval->{acct_name} value.

Since you're baffled, and you appear to be using strict, my first guess would be that BPP::ACCOUNT->getActiveUser($activeuser); returns undef as part of the return list sometimes.