Perl, pattern matching, substitution

2010-11-13 Thread Zachary Brooks
Hello, I'm taking a PhD course that requires the use of Perl and pattern matching. I've taken on the motto "divide and conquer," but it hasn't quite worked. I appreciate anyone's help. The task is to extract sentences from a relatively large text file (928K, ca. 300 pages). But of course, the tex

Perl, pattern matching, substitution, replacing

2010-11-14 Thread Zachary Brooks
Hello again, Yesterday I had a question on pattern matching. A couple of people responded with very useful information. After some finagling, I got my rudimentary code to work. I'm a PhD student studying computational linguistics without any formal programming training. While there are various mod

Re: Perl, pattern matching, substitution, replacing

2010-11-14 Thread Zachary Brooks
What happened when I used the code -- $hello =~ s/^(.+)$/\1<\/s>/gis; -- is that is properly marked and the beginning of the sentence and at the end of the sentence, but then it only worked for one sentence. Any suggestions on getting to appear at the beginning of every sentence and to appea