foreach my $record ( @emails ) { #record is the id number of the entry #lets fetch this email from the db, then we can stringify @email = LSRfm::Database::MegaList->search_id($record); $email = shift(@email);