@list = ($1, $2, $3, $4, $5); foreach $i (@list) { $i = int rand( @numb +1 ); pop @numb; }