$ perl -wle ' my @splitted = map { length $_ ? $_ : () } split(/(...)/, "abcdefghij"); print ">$_<" for @splitted; ' >abc< >def< >ghi< >j<