is there a way I can manipulate $_ or some other variable that can find a pattern in a line, and then grab information from the previous line(s)? I may encounter difficulty in storing the whole file in an array of lines (it's about 4 MB).while (<FILE>) { print; if (/$pattern/) { &do_some_other_thing; } }
In reply to read lines... wait, back up? by Konda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |