in reply to randomize array

How about

use List::Util qw(shuffle); my @shuffled_usernames = shuffle(@usernames);

Cheers, Flo