Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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
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 contemplating the Monastery: (3)
As of 2014-10-01 22:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (40 votes), past polls