use strict; use warnings; my @_lines = map {"$_\n"} split /\n/, <## ABC in the first line ABC = the line (1) but not the second ABC = the line (2)