c has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -wT use strict; open(FH, "file"); while(<FH>) { next until (/USE/); my $line = s/\\//g; print $line until (/USE/); } close(FH);
I realized after a few trials and only printing lines containing the word USE that each line will be judged against that first next statement causing it to be passed over. I feel as though I have the right idea, but I am missing some small detail. Can someone point me towards the right path?
humbly -c
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Print area between two lines within a file.
by Hofmator (Curate) on Sep 06, 2001 at 21:43 UTC | |
by trantor (Chaplain) on Sep 06, 2001 at 22:05 UTC | |
|
Re: Print area between two lines within a file.
by andye (Curate) on Sep 06, 2001 at 21:42 UTC | |
by nardo (Friar) on Sep 06, 2001 at 21:46 UTC | |
|
Re: Print area between two lines within a file.
by jryan (Vicar) on Sep 06, 2001 at 21:50 UTC | |
|
Re: Print area between two lines within a file.
by VSarkiss (Monsignor) on Sep 06, 2001 at 21:47 UTC |