sharan has asked for the wisdom of the Perl Monks concerning the following question:
process jkdgf jdk jhfk end process process jhdk jfka end process
while(<WORDLIST>) { if (/process/) #check for process { print "$_"; if (/end process/) { last; } }} close (WORDLIST);
as output.... i want output to be asprocess jkdgf end process
Many Thanks in advance..jdk jhfk jfka
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: read multi lines of a file in perl
by richb (Scribe) on Nov 05, 2008 at 14:04 UTC | |
by sharan (Acolyte) on Nov 05, 2008 at 14:32 UTC | |
by massa (Hermit) on Nov 05, 2008 at 15:01 UTC | |
|
Re: read multi lines of a file in perl
by gwadej (Chaplain) on Nov 05, 2008 at 14:54 UTC | |
by johngg (Canon) on Nov 05, 2008 at 16:02 UTC | |
by gwadej (Chaplain) on Nov 05, 2008 at 17:39 UTC | |
|
Re: read multi lines of a file in perl
by markov (Scribe) on Nov 05, 2008 at 13:55 UTC | |
by sharan (Acolyte) on Nov 05, 2008 at 14:31 UTC | |
by binf-jw (Monk) on Nov 05, 2008 at 15:33 UTC | |
|
Re: read multi lines of a file in perl
by ccn (Vicar) on Nov 05, 2008 at 13:42 UTC | |
|
Re: read multi lines of a file in perl
by flamewise (Initiate) on Nov 05, 2008 at 15:53 UTC | |
|
Re: read multi lines of a file in perl
by hangon (Deacon) on Nov 05, 2008 at 18:53 UTC |