Isograms and heterograms: Difference between revisions

Content added Content deleted
m (→‎{{header|Perl}}: clip file path)
m (make comment match code)
Line 338: Line 338:
}
}


say scalar(@heterogram) . " heterograms with 10 or more characters:\n" . join "\n", sort { length $b <=> length $a } @heterogram;</lang>
say scalar(@heterogram) . " heterograms with more than 10 characters:\n" . join "\n", sort { length $b <=> length $a } @heterogram;</lang>
{{out}}
{{out}}
<pre style="height:40ex">2 3-isograms:
<pre style="height:40ex">2 3-isograms:
Line 377: Line 377:
ii
ii


32 heterograms with 10 or more characters:
32 heterograms with more than 10 characters:
ambidextrous
ambidextrous
bluestocking
bluestocking
Line 515: Line 515:
my $minchars = 10;
my $minchars = 10;


say "\n({+$_}) heterograms with $minchars or more characters:\n" ~
say "\n({+$_}) heterograms with more than $minchars characters:\n" ~
.sort({[-.chars, ~$_]}).join: "\n" given
.sort({[-.chars, ~$_]}).join: "\n" given
@words.race.grep({.key.chars >$minchars && .value.values.max == 1})».key;</lang>
@words.race.grep({.key.chars >$minchars && .value.values.max == 1})».key;</lang>
Line 556: Line 556:
ii
ii


(32) heterograms with 10 or more characters:
(32) heterograms with more than 10 characters:
ambidextrous
ambidextrous
bluestocking
bluestocking