Never mind.  Found it on another perl email list.

s/[\n\r]+$/;

Brian Lasher
Best Practices and Yield Enhancement Team
Catalog DSP Product Engineering
Texas Instruments
 
281-274-2913 (W)
281-684-4699 (C)
281-274-2279 (F)
[EMAIL PROTECTED]

-----Original Message-----
From: Lasher, Brian 
Sent: Thursday, June 02, 2005 5:08 PM
To: beginners-cgi
Subject: newline issue



Brian Lasher
Best Practices and Yield Enhancement Team
Catalog DSP Product Engineering
Texas Instruments
I thought I saw emails on this in the past, but I couldn't find them in
my saved mailbox going back to nov 04.


I wrote a CGI utility running on a unix server that allows users to edit
"configuration" files for the tool via an html form.  Users decided that
they wanted the ability to be able to 1) view the actual file contents
in their browser, 2) save the info to a file on their machine, 3) edit
the file using texteditor of their choice, and 4) upload the edit file
back into the tool.

The script that uploads the file (back into the tool) uses cgi->upload.
Somewhere during the process, "^M"s get inserted at newlines, and I'm
having trouble getting rid of them  in my script as s/\W+$// doesn't
seem to be working.

Does anyone have a good way of getting around this.

-brian

 
281-274-2913 (W)
281-684-4699 (C)
281-274-2279 (F)
[EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to