in reply to (Golf) Character windows
It still has the problem of repeating the entire phrase if the window ($s) is larger than the length of the string. In order to correct that, I came up with a 65 character solution of#23456789_123456789_123456789_123456789_1234 map{$y=$_;map{$s[$_].=$y}$c..$s+$c++}/(.)/g;
Dave#23456789_123456789_123456789_123456789_123456789_123456789_12345 @t=/(.)/g;$s=@t<$s?@t:$s;map{$y=$_;map{$f[$_].=$y}$c..$s+$c++}@t;
|
|---|