Chomp is also a really useful perl function. It strips newline characters (and their ilk) from things.
$foo = <STDIN> # Read $foo From STDIN
Chomp($foo); # Remove \n from $foo

In Perl, removes a possible occurrence of $/ at the end of $_ (or the specified variable). This is safer than chop, because it won't chop off anything else. Typically, you use chomp after reading a line with <FILE> to get rid of the trailing newline.

Chomping a list applies chomp to each one.

choke = C = chomper

chomp vi.

1. To lose; specifically, to chew on something of which more was bitten off than one can. Probably related to gnashing of teeth. 2. To bite the bag; See bagbiter.

A hand gesture commonly accompanies this. To perform it, hold the four fingers together and place the thumb against their tips. Now open and close your hand rapidly to suggest a biting action (much like what Pac-Man does in the classic video game, though this pantomime seems to predate that). The gesture alone means `chomp chomp' (see "Verb Doubling" in the "Jargon Construction" section of the Prependices). The hand may be pointed at the object of complaint, and for real emphasis you can use both hands at once. Doing this to a person is equivalent to saying "You chomper!" If you point the gesture at yourself, it is a humble but humorous admission of some failure. You might do this if someone told you that a program you had written had failed in some surprising way and you felt dumb for not having anticipated it.

--The Jargon File version 4.3.1, ed. ESR, autonoded by rescdsk.

Chomp (?), v. i.

To chew loudly and greedily; to champ.

[Prov. Eng. & Colloq. U. S.]



© Webster 1913.

Log in or register to write something here or to contact authors.