in reply to Re^4: print matching lines
in thread print matching lines
Hint: try a simple loop:
then try to come up with a regex to match the records you want and print the appropriate thing. You'll need the //m flag.local $/ = "# input"; while (<FH>) { print "got record:\n", $_, ":end of record\n"; }
Another perfectly fine approach would be to leave $/ unchanged and save the line(s) you want to print, then print them if and when you get "ord".
|
|---|