in reply to Redefining chomp()

If you read the description of chomp, you will notice that ... it deletes the terminating string corresponding to the current value of $/ ....

Further down, it says

With version 5.6, the meaning of chomp changes slightly in that input disciplines are allowed to override the value of the $/ variable and mark strings as to how they should be chomped. This has the advantage that an input discipline can recognize more than one variety of line terminator ...

If you can, I'd look at that. If you can't, look at CORE::chomp().

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose