JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbruse strict; use warnings; use utf8; use Bytes::Random::Secure qw( random_string_from ); my $quantity = 64; my $bag = 'abcde'; # Generate a random string of 64 characters, each selected from # the "bag" of 'a' through 'e', inclusive. my $string = random_string_from( $bag, $quantity ); print $string, "\n"; # Unicode strings are ok too (Perl 5.8.9 or better): if( $^V && $^V ge v5.8.9 ) { $string = random_string_from( 'Ѧѧ', 64 ); binmode STDOUT, ':encoding(UTF-8)'; print $string, "\n"; }