Re: HOW: Check string existence in a file.
- From: Eric Schwartz <emschwar@xxxxxxxxx>
- Date: Wed, 31 Aug 2005 14:38:10 -0600
mrlawrencelam@xxxxxxxxx writes:
> Seeing my questin below and you will know that I don't know much about
> Perl. But I urgently need a simple Perl script that do this task:
This newsgroup is not for writing Perl programs for people (though you
may luck out and someone will do it anyway, because they're
sufficiently bored). It's about discussing Perl programs. So please
read the documentation first, and try and write some code; we're much
more inclined to help someone who's made a little effort than someone
who says, "I need you to write my code for me, for free, fast!".
> How do I write a little Perl script to read a file and check for a
> string?
>
> 1) Read the file "aaa.txt".
perldoc -f open
perldoc perlop (search for "I/O Operators")
> 2) If string "xxx yyy zzz" is in that file, then do action 1.
> 3) If not, then do action 2.
perldoc perlsyn
I hope these documentation references are helpful.
-=Eric
.
- References:
- HOW: Check string existence in a file.
- From: mrlawrencelam
- HOW: Check string existence in a file.
- Prev by Date: Re: Mail::Sendmail
- Next by Date: Re: Mail::Sendmail
- Previous by thread: HOW: Check string existence in a file.
- Next by thread: Re: HOW: Check string existence in a file.
- Index(es):
Relevant Pages
|