Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Infinite regex loop...

by wind (Priest)
on Jun 29, 2011 at 20:47 UTC ( #912034=note: print w/replies, xml ) Need Help??


in reply to Infinite regex loop...

What exactly are you trying to accomplish?

Your code is probably not doing what you want it to do, but there is no looping of any kind except for the file processing. Once that's done your code would finish.

How exactly are you trying to process the file? I could point out probable flaws in your current code, but it would be more effective if you explained your goal before we start trying to decipher your intent.

Replies are listed 'Best First'.
Re^2: Infinite regex loop...
by limzz (Novice) on Jun 29, 2011 at 21:04 UTC

    The file is a list. SPECint_base and SPECfp_base are headers. When it finds one or the other, its respective valid variable becomes true. It should not store the header in its respective hash. When it loops through, unless $_ is one of the headers, it should be put in whichever hash.

      I might understand what you want, but try making an example. Show us a fake data file in the format that your using and then state what should be the resultant data structures after processing.

      I know what I mean. Why don't you?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://912034]
help
Chatterbox?
[PriNet]: i think i found the problem, the "source" array that sets the individual key values isn't being cleared, it's keeping the previous values...
[atcroft]: PriNet: You might consider posting a small, self-contained snippet of that segment of your code, and see if someone else has a better idea.....
[atcroft]: PriNet: Ahhh... interesting.
[PriNet]: small would be a problem *heh*... the program reads all the lines from a pdf and converts the individual colum data to a seperate key/value pair... that's where the "previous" array from the pdf is not being cleared properly before reading the next pdf
[atcroft]: PriNet: It was a thought....
[PriNet]: thanx... actually just having someone to talk to was making me think... *heh*
[PriNet]: a regular array would just be "delete @array" correct? no need for the post "()" ?

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2017-06-28 03:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (620 votes). Check out past polls.