RE: printing contents between lines

2004-06-03 Thread Tim Johnson
Here's another way to do it, and the nice thing about this way is that you can reuse the sub later. This subroutine will print every line starting after the $start phrase and until it finds the $end phrase. ### PrintSection("myfile.txt","tools:","not a ta

Re: printing contents between lines

2004-06-03 Thread Chris Charley
- Original Message - From: "Chris Charley" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: <[EMAIL PROTECTED]> Sent: Thursday, June 03, 2004 7:09 PM Subject: Re: printing contents between lines > > - Original Message - > From: "Sidhar

Re: printing contents between lines

2004-06-03 Thread Chris Charley
- Original Message - From: "Sidharth" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: <[EMAIL PROTECTED]> Sent: Thursday, June 03, 2004 3:44 PM Subject: printing contents between lines hi all , consider the contentes of file as below [snip file contents] how to print all the li

Re: printing contents between lines

2004-06-03 Thread John Harrington
How about: my $myvar = qq(); $myvar=~s/tools:(.*?)# Not a//sg; print $1; John From: "Sidharth" <[EMAIL PROTECTED]> > hi all , > consider the contentes of file as below > > === > tools: > # Phony target (prerequisite of .PHONY). > # Implicit rule s