Robert:

      An example is below.



#!/usr/bin/perl -w

open(FILE,"/etc/passwd") || die "Cannot open file: $!";

while ( <FILE> )
{
   if( /Ezra/ )  #I'm searching for strings with the word Ezra.
    {
          print $_;  # Now I'm printing lines with the name Ezra
     }
} 

close(FILE);


On 4/24/05, Robert Kerry <[EMAIL PROTECTED]> wrote:
> I want to use Perl to extract keywords from plaintext, don't know
> whether there are some exsiting package / algorithm for doing that?
> Thank you.
> 
> Regards,
> 
> Robert.
> 
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
> 
>

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to