Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

RE: RE: RE: Re: script adding spaces into a file for no reason...

by Anonymous Monk
on May 25, 2000 at 00:09 UTC ( [id://14657]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://14657]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2025-07-14 21:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.