Zero is what your function (by way of the for loop) is (implicitly) returning. If you intended to return something else, you should explicitly
return something. Note that you are shuffling the @usernames array in place...you can see that with
print "@usernames\n";