in reply to RE: RE: Re: script adding spaces into a file for no reason...
in thread script adding spaces into a file for no reason...

Thanks to everyone for their help. It's working now. Here's the core file saving code for your reference. It removes unncessary line returns, etc.

if (defined $query->param('Submit')) { open NEWNEWS, "> cgi/news.txt" || die "Cannot open file: $!"; $result = $query->param('content'); $result =~ s/\r//g; print NEWNEWS $result; close(NEWNEWS); print '<p>Saved your changes.</p>'; $query->delete('Submit'); }


JoeG