Perl: 18 - 10 = 8 bytes ======================= The string is from STDIN. <!-- language: lang-perl --> $_=<>;{print;redo}