while() { s#([()])#\n$1\n/g; for( split /(?<=\n)/ ) { print "Look Ma, still got newlines: $_"; } }