in reply to Re: Regexing an input stream...
in thread Regexing an input stream...

You have not read the original post very carefully...

Replies are listed 'Best First'.
Re: Re: Re: Regexing an input stream...
by aquarium (Curate) on Jun 19, 2003 at 01:26 UTC
    he/she almost answered it.
    while ($line .= <Stream>) { exit if ( $line =~ m/b\n*l\n*a\n*h/m); }
      He/She did not understand the scope of the request. Probably the posted request was not too clear.

      I don't want to match things on a line by line only and I don't want to modify $/ to read other types of chunks of text. Just set $/= undef.

      The deeper problem is how to apply a regular expression with multiple matches options to a stream so I don't have to load large pieces of the file and to re-start the reglar expression if it fails.

      So far one of the suggestions makes possible sense... if the regex engine can be tricked into working with an expanding buffer.

      Sergio