good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Removing the ^M character, but also removing the newlineby c (Hermit) |
on Dec 29, 2001 at 04:51 UTC ( [id://135026]=perlquestion: print w/replies, xml ) | Need Help?? |
c has asked for the wisdom of the Perl Monks concerning the following question:
all-
i have an html form that passes information within a <textarea> as part of its feedback. the type within the text area can obviously include hard returns sent by the page visitor. these appear as ^M when i print the data to a flat file. i would like to remove the entire carriage return, however and not just the ^M character. i perused this but found that using tr/// or s/// simply removes the character, and doesnt really get rid of the newline. a post within the one i mentioned seemed to touch on this, but no one seemed to follow up on the thread. currently, i have:
humbly -c
Back to
Seekers of Perl Wisdom
|
|