---------- Forwarded message ----------

PST! Just a little correction...
Sorry..
Karl

Hello, JA

Sorry my very week english language. I have try to find a solution for
your problem. But I'm a beginner to. At least. This work on my Red Hat
Linux 7.1 OS

If you try this:-)
Copy and past everything between ==start== and ==stop==
Save it in a file named misc.pl (or misc.cgi)
chmod 755 misc.pl
run it like this:

perl misc /path/to/the/source_file > print_the_results

Then you can open the new file named "print_the_results"
and every linje with a "." or "?" or "," will be there..
Ok?

Karl

==start==
#!/usr/bin/perl -w

use strict;
open(SOURCE);                   # open the file
while(<>){                      # loop through the file
        if($_ =~ /\?|\.|\,/){   # search for your ". , ?"
        print "$_";             # print the results
        }                       # end if statement
}                               # end the while loop
close(SOURCE);                  # close the file
==stop==

I try it on Linux and it open and read a file.
Find the "." and "?" and "," in some sentence




>
> Hello,
> Do's anyone know of a perl script which prints only sentence lines
> containing either a period "." question"?"
> and a "," comma.
>
> Many Thanks:)
> Just a beginner:)
> JA
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to