Idiomatically determine all the lowercase and uppercase letters: Difference between revisions
Idiomatically determine all the lowercase and uppercase letters (view source)
Revision as of 13:13, 4 April 2023
, 1 year ago→{{header|Perl}}: look beyond just ASCII
(Idiomatically determine all the lowercase and uppercase letters in various dialects BASIC) |
SqrtNegInf (talk | contribs) m (→{{header|Perl}}: look beyond just ASCII) |
||
Line 970:
=={{header|Perl}}==
<syntaxhighlight lang="perl">
use utf8;
$c = chr $i;▼
binmode STDOUT, ':utf8';
my($lower,$upper);
for my $i (0..2**8-1) {
▲ my $c = chr $i;
$lower .= $c if $c =~ /[[:lower:]]/;
$upper .= $c if $c =~ /[[:upper:]]/;
}
{{out}}
<pre>abcdefghijklmnopqrstuvwxyzªµºßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ
ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ</pre>
=={{header|Phix}}==
|