in reply to Applying a regex across multiple files
you can slurp the whole stream into a scalar withwhile(<>){ #examine one line }
and then process with a normal regular expression. Use the s flag on your regular-expression to get it to span lines.my $s=join '',<>;
if($s=~/foo\s*(\d+)\s*bar/s){ ... }
|
|---|