in reply to Re^4: Undef values from file openin thread Undef values from file open
Maybe you have trailing blank lines .
while (my $line = <$lines>) { next unless $line =~ /\S/; # <- add chomp $line; . . [download]