Re: matching values of one hash to another

2010-04-29 Thread Harry Putnam
Jim Gibson writes: > The general advice is not to worry about execution time until it becomes an > issue. In other words, just get your program to do what you want it to do, > then try to speed it up only if it is taking too long. With that in mind... I'm back to spinning through the second hash

Re: matching values of one hash to another

2010-04-29 Thread Jim Gibson
On 4/29/10 Thu Apr 29, 2010 5:15 PM, "Harry Putnam" scribbled: >> >> The braces ({}) mean that %data is a "hash-of-hashes", i.e., the values of >> the elements of %data are references to hashes. > > Needless to say, I'm a bit confused here googling on `hash of > hashes' has plenty of hits

Re: matching values of one hash to another

2010-04-29 Thread Harry Putnam
Jim Gibson writes: [...] thanks for the tips on timing > The general advice is not to worry about execution time until it becomes an > issue. In other words, just get your program to do what you want it to do, > then try to speed it up only if it is taking too long. That sound sensible. [...]

Re: matching values of one hash to another

2010-04-29 Thread Jim Gibson
On 4/29/10 Thu Apr 29, 2010 2:06 PM, "Harry Putnam" scribbled: > "John W. Krahn" writes: > > [...] > >>> In other words is the perl interpreter working harder in one case? >> >> Yes. > > Thanks. Do you have any idea how much worse it is? > > I ask because I have some old scripts that go

Re: matching values of one hash to another

2010-04-29 Thread Harry Putnam
"John W. Krahn" writes: [...] >> In other words is the perl interpreter working harder in one case? > > Yes. Thanks. Do you have any idea how much worse it is? I ask because I have some old scripts that go spinning thru the whole hash in that same way, that I should probably track down and ch

Re: matching values of one hash to another

2010-04-29 Thread Harry Putnam
"Uri Guttman" writes: > again, why the poor names? what is 'base'? how is 1 different than 2? > you have yet to properly specify the PROBLEM. you keep talking about Easy up a little Uri... I hadn't seen your post when I wrote that response to John. -- To unsubscribe, e-mail: beginners-unsubsc

Re: matching values of one hash to another

2010-04-29 Thread John W. Krahn
Harry Putnam wrote: I posted my effort at digging out the matches. I see the way you did it, even though not the exact results I was after is 100s of percent better way to write it. I'm curious though if the overhead is different in your compact code compared to mine. That is, if all that

Re: matching values of one hash to another

2010-04-29 Thread Uri Guttman
> "HP" == Harry Putnam writes: HP> "John W. Krahn" writes: >>> I need to do some matching of filenames in two top level directories. >>> We expect to find a number of cases where the endnames ($_) are the >>> same in both hierarchies but the full name is different. >>> >>> base1

Re: matching values of one hash to another

2010-04-29 Thread Harry Putnam
"John W. Krahn" writes: >> I need to do some matching of filenames in two top level directories. >> We expect to find a number of cases where the endnames ($_) are the >> same in both hierarchies but the full name is different. >> >> base1/my/file >> base2/my/different_path/file This should h

Re: matching values of one hash to another

2010-04-29 Thread Uri Guttman
> "HP" == Harry Putnam writes: HP> I need to do some matching of filenames in two top level directories. HP> We expect to find a number of cases where the endnames ($_) are the HP> same in both hierarchies but the full name is different. someone else mentioned this but endname and full

Re: matching values of one hash to another

2010-04-28 Thread John W. Krahn
Harry Putnam wrote: I need to do some matching of filenames in two top level directories. We expect to find a number of cases where the endnames ($_) are the same in both hierarchies but the full name is different. base1/my/file base2/my/different_path/file I've made hashes of the file nam

matching values of one hash to another

2010-04-28 Thread Harry Putnam
I need to do some matching of filenames in two top level directories. We expect to find a number of cases where the endnames ($_) are the same in both hierarchies but the full name is different. base1/my/file base2/my/different_path/file I've made hashes of the file names in two top level d