in reply to array problem - splitting array

for my $word (@sen) { next if ($word =~m/\A\s*\z/); do_something(word); }
or
my @clean_sen = grep { !m/\A\s*\z/ } @sen;
Or split on arbitrary whitespace while generating the array:
@sen=split(/\s+/,$sent);

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan