Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
use Unicode::UCD 'charinfo';
|
||||
|
||||
for (
|
||||
['', ' '],
|
||||
['"If I were two-faced, would I be wearing this one?" --- Abraham Lincoln ', '-'],
|
||||
['..1111111111111111111111111111111111111111111111111111111111111117777888', '7'],
|
||||
["I never give 'em hell, I just tell the truth, and they think it's hell. ", '.'],
|
||||
[' --- Harry S Truman ', ' '],
|
||||
[' --- Harry S Truman ', '-'],
|
||||
[' --- Harry S Truman ', 'r']
|
||||
) {
|
||||
my($phrase,$char) = @$_;
|
||||
(my $squeeze = $phrase) =~ s/([$char])\1+/$1/g;
|
||||
printf "\nOriginal length: %d <<<%s>>>\nSqueezable on \"%s\": %s\nSqueezed length: %d <<<%s>>>\n",
|
||||
length($phrase), $phrase,
|
||||
charinfo(ord $char)->{'name'},
|
||||
$phrase ne $squeeze ? 'True' : 'False',
|
||||
length($squeeze), $squeeze
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue