in reply to Re^3: sorting text into sentences.
in thread sorting text into sentences.
#!/usr/bin/perl -w use Strict; $dat = "a.txt"; open(DAT, "$dat") || die "Can't open the file.\n"; @a=<DAT>; close(DAT); my $temp3; foreach (@a) {chomp $_; $temp3 .= "$_ "} @a = split(/.,;/, $temp3); foreach (@a) {$_ .= "\n";} print @a;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: sorting text into sentences.
by ysth (Canon) on Sep 06, 2004 at 08:18 UTC | |
by chiburashka (Initiate) on Sep 06, 2004 at 09:14 UTC | |
by ysth (Canon) on Sep 06, 2004 at 09:23 UTC | |
|
Re^5: sorting text into sentences.
by ysth (Canon) on Sep 06, 2004 at 09:35 UTC |