in reply to Re: How do I trauncate a flat file, then append to front?
in thread How do I truncate a flat file, then append to front?

For point 1 and 2, you actually don't need to chomp the new lines away, and then add them back. Those blanks you got at the beginning of the lines, starting from the second line from the old file, is $LIST_SEPARATOR, and default value is space. You can do this:
use English; $LIST_SEPARATOR = "";