in reply to
why does 'sed' remove the entire line?
What if you just used Perl? as long as you're in there, no reason at all to fork to sed:
$line =~ s/\s+$//mg
....
Comment on
Re: why does 'sed' remove the entire line?
Download
Code
In Section
Seekers of Perl Wisdom