> Hi, > I want to match a multiline pattern in a very big text > file say 500 MB. I can't take all the lines in a > string a array in one shot due to memory problem, I > have to read file in chunks of line. > Any help? >
What is the pattern like? Is it fixed length? How variable is it? perldoc -f seek perldoc -f index Might give you some ideas. You could index through the lines looking for the beginning of the pattern, then skip to the spots in the file where it could possibly match, then start checking, etc. But all of that depends on how complex your pattern is, if it is fairly fixed this should be trivial. http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>