http://qs1969.pair.com?node_id=50631


in reply to (Ovid -Golf) Re(3): How do you chomp your chomps?
in thread How do you chomp your chomps?

All fine and good while $/ is \n. Dunno about you :), but I've been known to change it now and then:

sub my_chomp { substr shift, 0, ((length) = length($/)) if $_[0] =~ /$\$/};

Untested, but I would like to point out that the regex is pretty.