use String::Random qw/ random_string /; use List::Util qw/ shuffle /; print random_string(join '', shuffle((qw/ c C n /) x 3));