my @lines = grep { s/^\s+//; s/#.*//; s/\s+$//; length($_) } <$in>;