in reply to Unable to remove items from an array that are empty ' '
use warnings; use strict; use Data::Dumper; my @ls = ('stuff', '', 'stuff', '', 10, '', '-', ''); @ls = grep {length} @ls; print Dumper(\@ls); __END__ $VAR1 = [ 'stuff', 'stuff', 10, '-' ];
|
|---|