I tried it and got something, but this spits out from the LAST line that
contains a match to the end of the input file, and I can't see why it does
that. How can I change this to spit out from the FIRST occurance of the RE?
perl -i -n -e "unless($ok || /RE/) {<>} else{print;$ok=1}" foo