chomp

A Scala String chomp (or chop) function

Scala string FAQ: Does Scala have a String method like chomp or chop that you find in Perl?

If you're using Scala and want a string chomp or chop method that you're used to in languages like Perl to remove end of line characters, the stripLineEnd method will do what you want, as shown in the REPL:

A Perl array chomp example

Summary: How to use the Perl array chomp syntax to chomp every element in a Perl array.