in reply to Username creation function (was: simple problem...)

You mean like this?

sub foo { my $user = shift; print "$user\n"; } for my $user_id ('a'..'z') { foo("user-$user_id"); }