in reply to split file and search respectly

Hi xiaoyafeng,

You have to take a look at Tie::File and perlre.

From the documentation:

The file is not loaded into memory, so this will work even for gigantic files.

A sample code to proceed....

use strict; use warnings; use Tie::File; my @file; tie @file, 'Tie::File', "test.txt" or die "$!"; for (0..5) { print "ORA is present\n" if $file[$_] =~ /ORA/; }

update: added code.

Prasad