http://www.perlmonks.org?node_id=731097


in reply to Match a list of numbers from a list of files

One thing that jumps out at me is that you are essentially traversing the file twice. You could check $line for a match at the same time you are push-ing it to @temp instead of creating @temp then checking each @temp. If you have a match, set a flag that tells you that something else needs to be done with @temp when you reach END.
  • Comment on Re: Match a list of numbers from a list of files

Replies are listed 'Best First'.
Re^2: Match a list of numbers from a list of files
by shawshankred (Sexton) on Dec 18, 2008 at 00:50 UTC
    Thanks a lot man..I'll use the suggestion and try it out. Appreciate your help.