I am wanting to print all the lines between two lines containing the word USE. I quickly jotted down:
#!/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