in reply to Re^3: help with REGEXP to remove carriage return and caret from end
in thread help with REGEXP to remove carriage return and caret from end

The key word in my reply however was "generally" in the first sentence. Generally, as elaborated in my previous reply, chop is not such a useful function.

Oh, I agree that it works for OP's problem as stated. But it is a fragile solution. Very likely that doesn't matter in OP's case. But in the interests of general education it is worth noting that chop is unfussy about what it removes and that chomp only removes trailing contents matching $/, and that $/ may contain anything.


DWIM is Perl's answer to Gödel
  • Comment on Re^4: help with REGEXP to remove carriage return and caret from end

Replies are listed 'Best First'.
Re^5: help with REGEXP to remove carriage return and caret from end
by CountZero (Bishop) on Jul 26, 2006 at 06:06 UTC
    OK, in that case I generally agree with you! :-)

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law