@lines = <DATA>
The LHS (left-hand side) of the assignment is an array, which gives list context to the expression on the RHS. When the readline or “diamond” operator <...> is placed in list context, it “reads until end-of-file is reached and returns a list of lines.” Lines are defined as the text between successive input record separators. The input record separator, stored in $/, “is newline by default.” See readline and General Variables in perlvar.

chomp(...);
When chomp is given a list, it chomps (removes the input record separator from) each element in the list.

That wasn’t really so hard, was it? ;-)

Avoid writing $_ in your code.

Yes, avoid writing $_ explicitly where possible. But be aware that an explicit $_is often needed; for example:

Went to join the gridlock to see it
Held an eclipse party
Watched a live feed
I cn"t see tge kwubosd to amswr thus
I tried to see it, but 8000 miles of rock got in the way
What eclipse?
Wanted to see it, but they wouldn't reschedule it
Read the book instead