At 2:16 PM -0500 11/14/10, shawn wilson wrote:
so, if you've got a file, do something like:
while ($line = <FH> ) {
$line =~ m/^(.+)$/ig;
print "<s>$1<\/s>\n";
}
If all you want to do is print each line in the file surrounded by<s>
tags, you don't need regular expressions, and you don't need to
escape forward slash characters in double-quotes:
while ($line = <FH> ) {
chomp($line);
print "<s>$line</s>\n";
}
As Rob said, the hard thing with this task is finding out where
sentences begin and end.
--
Jim Gibson
[email protected]
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/