sub chomp_all { my $retval = 0; foreach (@_) { my $count; 1 while chomp($_) && $retval += $count; } return $retval; }