Simply add it after the line the same way, by including it at the end of the printed string:
chomp; # Strip off newline character
print NEWFH "-> $_ <-\n"; # Add newline ay the end
As far as longest string and total count: you can use 2 variables to store the current max length and current total, and calculate them with the help of the length
function. Keep a third variable for line count.