which gives me the whole file in $lines. Now I need to get all lines that satisfy a pattern in $myPattern into an array @patternMatchArray Is there a way to do this quickly other than a line by line approach.open(FILE, "$filename") or die "Cant open $filename\n"; local $/ = undef; my $lines = <FILE>; close(FILE);
In reply to matching lines in multi-line string by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |