chen li wrote:
> Hi guys,

Hello,

> Sorry to bother again. I get an AoA containing empty
> elements like these:
> 
> my @data=(
>            [1,1,1],
>            [2,2,2],
>            [],
>            [3,3,3],
>            []
>         );
> 
> How can I remove the empty element in this AoA? Can I
> use grep function to do it?

Yes:

@data = grep @$_, @data;



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to