in reply to grep equivalent in perl

Title question: "grep equivalent in Perl"?
            Answer: grep

But that's not the same as the key question in your narrative; namely "how do I ' grep without opening the files...'?"

At least as I understand it, that translates to "I want to read something (inside) files without opening the file."

Better to try for an answer to that at Magic_Monks or Sorcerers,Inc.

So, looking for another approach involving Perl, and assuming you meant -- in your second sentence -- either (less likely:) 'these are close to a million large files' or (more likely, I guess1) 'These files contain close to a million lines each':

1 Making us guess what you mean can be a matter of ignorance of a subject matter, sloppy writing or sloppy thought. If it's not the first of those, see I know what I mean. Why don't you?; in fact, see it anyway.
See also: On asking for help and How do I post a question effectively?.