in reply to Selecting DB

This likely is not what you want:

    my $TotalEmails = $user1 + $user2;

Most likely you wanted

my @TotalEmails = (@$user1, @$user2);

If you allow Perl to tell you when you're doing non-sensical stuff, please add the following two lines to the top of your script:

use strict; use warnings;

Replies are listed 'Best First'.
Re^2: Selecting DB
by frank1 (Monk) on Jul 08, 2023 at 13:11 UTC

    this is what i get

    ARRAY(0x56295a1b7458) ARRAY(0x56295a2c1878)

    when i try this

    my @TotalEmails = (@$user1, @$user2);

        Thanks it worked!

        it worked, but am getting emails like this

        test@test.com test2@test2.com

        no comma, coz i wanted to join emails with comma