Novician has asked for the wisdom of the Perl Monks concerning the following question:

I have a web form with a multi-line text box. When I look at the data entered into this field, I see it contains these ^M (Ctrl-M) characters at the end of each line. How can I get rid of these?

Originally posted as a Categorized Question.

  • Comment on How to remove ^M characters from a string?

Replies are listed 'Best First'.
Re: How to remove ^M characters from a string?
by nuance (Hermit) on Jun 01, 2000 at 14:10 UTC
Re: How to remove ^M characters from a string?
by Roy Johnson (Monsignor) on Nov 04, 2003 at 15:03 UTC
Re: take out ^m from a string which contents data from a multi-line textbox
by Novician (Novice) on Jun 01, 2000 at 12:36 UTC
    sorrie...
    after i type
    print "$textvariable"

    the output is -->
    testing1^M
    testing2^M
    testing3^M

    sorrie, did not seperate them juz now.

    Originally posted as a Categorized Answer.