Bart Lateur wrote:
> 
> chomp() is basically just a "postprocess data coming from a file"
> command.

That is way too simplistic.  I for one think the current behavior
of chomp() is ideal for its simplicity.

        while(<>) {
                /foo/ and next;  # why bother chomping?
                if ( /bar/ ) {
                        print; # why bother chomping?
                }
                elsif ( /quux/ ) {
                        s/$/ (quux found)/;
                        print; # why bother chomping?
                }
                else {
                        chomp;
                        $x{ $_ . $y };
                }
        }

-- 
John Porter

Reply via email to