day10
This commit is contained in:
parent
86420d1bbd
commit
daadd18fa2
12
2015/10/repeat.pl
Normal file
12
2015/10/repeat.pl
Normal file
@ -0,0 +1,12 @@
|
||||
use 5.20.0;
|
||||
|
||||
my $s = <>;
|
||||
chomp $s;
|
||||
say $s;
|
||||
|
||||
|
||||
$s =~ s/(.)\1*/ length($&) . $1 /eg for 1..40;
|
||||
|
||||
say $s;
|
||||
say length $s;
|
||||
|
10
2015/10/repeat2.pl
Normal file
10
2015/10/repeat2.pl
Normal file
@ -0,0 +1,10 @@
|
||||
use 5.20.0;
|
||||
|
||||
my $s = <>;
|
||||
chomp $s;
|
||||
say $s;
|
||||
|
||||
$s =~ s/(.)\1*/ length($&) . $1 /eg for 1..50;
|
||||
|
||||
say length $s;
|
||||
|
Loading…
Reference in New Issue
Block a user