in reply to table of values
#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11139200 use warnings; use List::Util qw( none ); $| = 1; my @strings; while( @strings < 10 ) { my $try = join '', map +('A' .. 'Z')[rand 26], 1 .. 5; if( none { ($try ^ $_) =~ tr/\0//c < 3 } @strings ) { push @strings, $try; print "$try "; } } print "\n";
Sample Output
OJLGF RESJW YKHXZ CGINN RMVRS NBVJA PKZFG DHBNR JMXML QFAUY
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: 10 x 10 table of values
by dnamonk (Acolyte) on Nov 29, 2021 at 20:44 UTC | |
by tybalt89 (Monsignor) on Nov 29, 2021 at 22:27 UTC | |
by dnamonk (Acolyte) on Nov 30, 2021 at 00:07 UTC |
In Section
Seekers of Perl Wisdom