in reply to Perl modifying output of an array to remove blank lines

Could this be as simple as inserting

next unless scalar @goodlines;

immediately before your print of @goodlines, because I think that ought to be the smallest change which achieves your goal. It would probably help your debugging if you were to use warnings too.

Replies are listed 'Best First'.
Re^2: Perl modifying output of an array to remove blank lines
by namelessjoe (Initiate) on Oct 08, 2015 at 19:47 UTC
    that achieved desired results, thanks. i have alot to learn yet obviously