in reply to Capturing Space with Split
Listen to the Brethren - show us your problem! The code below is taken from I know what I mean. Why don't you? and demonstrates a very simple way to include test data in your post to demonstrate a problem.
while (<DATA>) { print $_; } __DATA__ Hello world
Let's edit that a little to perhaps get closer to the question you want to ask:
use warnings; use strict; while (<DATA>) { chomp; my @sentences = split /(?<=\.)\s*/; print '>', join ("<\n>", @sentences), '<'; } __DATA__ Hello world. Hello Bretheren. Goodbye spaces. All I really want are se +ntences.
Which prints:
>Hello world.< >Hello Bretheren.< >Goodbye spaces.< >All I really want are sentences.<
Now, your job is to modify that to demonstrate the problem you are having and to show us the output you expect to get.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Capturing Space with Split
by Gavin (Archbishop) on Mar 13, 2006 at 21:20 UTC | |
by GrandFather (Saint) on Mar 13, 2006 at 21:51 UTC |