in reply to Re: Re: Always leaving one space in file
in thread Always leaving one space in file

Try not opening the file unless you have data in the @changes array:
if (@changes) { # do stuff here }
I don't know how to count the length of the string...?:
my $length = length $some_string;
-- vek --