Re: hash usage

2008-02-12 Thread Chas. Owens
On Feb 12, 2008 10:19 AM, Johnson, Reginald (GTI) <[EMAIL PROTECTED]> wrote: snip > Thank you for the reply. I'm definitely still in the crawl before you > can walk stage with perl and hashes. > Can you help me understand why I would make the the file handle a scalar > $SUMMARY instead of just SUM

RE: hash usage

2008-02-12 Thread Johnson, Reginald (GTI)
-Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Monday, February 11, 2008 4:35 PM To: Perl Beginners Subject: Re: hash usage Johnson, Reginald (GTI) wrote: > I have two input files and I put each into a hash. If the key of one > hash matches the other then I

Re: hash usage

2008-02-11 Thread Kashif Salman
Elegant! On Feb 11, 2008 1:35 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: > Johnson, Reginald (GTI) wrote: > > I have two input files and I put each into a hash. If the key of one > > hash matches the other then I output some values from both. I have > > accomplished the output that I want but I

Re: hash usage

2008-02-11 Thread John W. Krahn
Johnson, Reginald (GTI) wrote: I have two input files and I put each into a hash. If the key of one hash matches the other then I output some values from both. I have accomplished the output that I want but I want to know if it can be done in a more efficient manner. Yes. #!/usr/bin/perl use s

hash usage

2008-02-11 Thread Johnson, Reginald (GTI)
I have two input files and I put each into a hash. If the key of one hash matches the other then I output some values from both. I have accomplished the output that I want but I want to know if it can be done in a more efficient manner. #!/usr/bin/perl use strict; use warnings; open(SUMMARY