http://qs321.pair.com?node_id=1221282

dideod.yang has asked for the wisdom of the Perl Monks concerning the following question:

HI monks. I have a few working about parsing text file. Sometimes text file's lines are so many. about 50,000,000 lines... I always open text file using open fuunction. then I need to wait long time to complete my script... Do you have any special function to open text file?? below is my sample script.
###### test.txt######## sample AA sample BB Not sample CC good boy good yyy bad aaa
open(FILE,"test.txt"); while(<FILE>){ if(/^sample\s+(\S+)/){push @sample,$1} if(/^good\s+(\S+)/){push @good,$1} } close(FILE);