print "[$_]\n" for split /(foo)/, 'this foo is foo ... ey'; __output__ [this ] [foo] [ is ] [foo] [ ... ey]