in reply to help with REGEXP to remove carriage return and caret from end

If you want to remove an end of line character from the end of a string then chomp is your best bet. If that's not working then you need to tell us more about the data you're getting. Perhaps there's something else there other than your operating system's end of line character.

And I'm slightly confused by the rest of your question. You say that you want to remove '^' from the end of the string, but the sample data you give doesn't have that character in it.

I think that in order for us to be any real help to you, you'll need to expand a bit on what you're trying to do. Give us a complete (but small) example program that we can run and explain what unexpected behaviour you are seeing.

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

  • Comment on Re: help with REGEXP to remove carriage return and caret from end