in reply to Re^3: How to pass --MORE--in thread How to pass --MORE--
@lines = grep is_empty($_), @lines; [download]
Where is_empty depends of your definition of empty. For instance:
sub is_empty { my $line = shift; $line eq '' } [download]
BTW, even if you may still be facing the same issue, this is a different question. You should open a new thread for it.