in reply to Regexing an input stream...

Can Perl apply a matching regex to an input stream instead of just a scalar?

Sort of. See Matching in huge files for one trick that works. It involves using the seldom-used /c modifier to coordinate with pos(), while shifting a pair of page buffers (and adjusting pos()) to get a sliding window through a stream.