my $flag = false; my @saved #the saved portion of the file while (<FILE>) { #set the flag to true when we find the word Well if (/Well/) { $falg = true; } if ( $falg ) { push @saved, $_; #$_is the current line in your file } }
In reply to Re: doing something with the rest of a file after matching a keyword
by krujos
in thread doing something with the rest of a file after matching a keyword
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |