in reply to any built in function to take out null arrays elements?
$array = join /$splitter/, @array; # where $splitter is a scalar that +will not be in an element $array =~ s/$splitter{2,}/$splitter/g; @array = join $splitter, $array;
Variations would be required for multi-line strings, of course.
Update: inserted a missing $.
|
|---|