in reply to Re^2: Remove empty element.
in thread Remove empty element.
@array = grep { $_ } @array;
This grep also removes array elements that happen to be 0. Use grep { defined && length } instead if you want to have the 0 elements in the result.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Remove empty element.
by pemungkah (Priest) on Jul 15, 2009 at 20:48 UTC |