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