Timeline for "99 Bottles of Beer"
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 10, 2016 at 23:41 | history | edited | anna328p | CC BY-SA 3.0 |
edited body
|
Jul 10, 2016 at 23:34 | history | edited | anna328p | CC BY-SA 3.0 |
Golfed it down some more
|
Jul 10, 2016 at 9:32 | comment | added | Martin Ender |
Also i<3 instead of i==2 and you can put actual linefeeds in your strings instead of using the \n escape sequence.
|
|
Jul 10, 2016 at 7:07 | comment | added | primo |
Alternatives for $C : $C=$B.tr('s','') , or assuming you rename $B to $_ : ~/s/;$C=$`+$' .
|
|
Jul 10, 2016 at 6:51 | comment | added | primo |
Save a few bytes my moving each string definition to its first use: #{i}#{$B=' bottles of beer'}#{$W=' on the wall'} , and #{i-1}#{i==2?$C=' bottle of beer':$B} .
|
|
Jul 10, 2016 at 6:35 | history | answered | anna328p | CC BY-SA 3.0 |