Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Match a list of numbers from a list of files

by state-o-dis-array (Hermit)
on Dec 17, 2008 at 23:28 UTC ( #731097=note: print w/ replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://731097]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2015-07-28 03:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (251 votes), past polls