When chomp is used on an array (@array), it operates on ALL elements, removing trailing newlines from each one. It doesn't just work on first or last element. This is a useful feature for cleaning up multiple lines at once. The option 'wont work on array' is incorrect.