... $passwd .= splice @{ $all[ $_ ] }, rand @{ $all[ $_ ] }, 1 for @order; ...