http://www.perlmonks.org?node_id=788891


in reply to Re^4: remove line feed at the end
in thread remove line feed at the end

Your code seems that concatenating of lines is only for the last statement before the {FILE} tag. Figure out the way to solve it.