for (@files) { # open my $fh, '<', $_ or (warn "$_: $!\n"), next; push @first_lines, scalar <$fh>; }