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