in reply to Re: Chop command that removes the first character
in thread Chop command that removes the first character

Hi!

Chop removes only whitespace...

What you mean is chomp. chop removes any character.

EDIT: TedPride: Please don't just delete what you wrote. Now nobody knows what I have been talking about ... as usual :)

mawe

  • Comment on Re^2: Chop command that removes the first character

Replies are listed 'Best First'.
Re^3: Chop command that removes the first character
by tachyon (Chancellor) on Oct 26, 2004 at 09:56 UTC

    Because you have quoted it we know what was there. As a minor pedant chomp will remove any char that corresponds to $/ aka the $INPUT_RECORD_SEPARATOR. For example if you undef $/ but don't localise (or restore) it chomp will mysteriously fail. Not only that it is a global.....

    cheers

    tachyon