in reply to Apply regex to entire file, not just individual lines ?

After you've opened and read the file (or web page) into an array, join all lines with join().
open(FILE, "$filename");
@lines = <FILE>;
close(FILE);

$content = join('', @lines);
After this, $content will be single-line and it is easy to do regexp with your existing functions.
  • Comment on Re: Apply regex to entire file, not just individual lines ?