in reply to Re: RE on lines read from in-memory scalar is very slowin thread RE on lines read from in-memory scalar is very slow
Or use File::Slurper. Nice clean interface, and I believe the author actually looked into what's the fastest approach.