in reply to Re: Complex Splittingin thread Complex Splitting
@arr = grep {defined} $str =~ /(\w)|\[(\w+)\]/g; gets exactly what you wanted without the brackets. Not sure how to avoid the undef's except grepping them out.