in reply to Re^3: How to pass --MORE--
in thread How to pass --MORE--

Hi again salva, is there any way to remove empty lines from array? I tried with grep but it doesn't work. thnaks.

Replies are listed 'Best First'.
Re^5: How to pass --MORE--
by salva (Canon) on Feb 17, 2015 at 13:58 UTC
    @lines = grep is_empty($_), @lines;

    Where is_empty depends of your definition of empty. For instance:

    sub is_empty { my $line = shift; $line eq '' }

    BTW, even if you may still be facing the same issue, this is a different question. You should open a new thread for it.