use warnings; use strict; my @check = grep { chomp $_; $_ } ; print ">>@check<<" __DATA__ line1 0 line3