Re: newbie stuck in a hash

2003-02-01 Thread R. Joseph Newton
Pam Derks wrote: > my %all_keys = (); > > foreach my $key (keys %hash1) { > $all_keys{$key} = 1; > } > > foreach my $key (keys %hash2) { > $all_keys{$key} = 1; > } Hi pam, It strikes me that you are throwing away information here. Even if that information is not needed in the immediate con

Re: newbie stuck in a hash

2003-01-31 Thread John W. Krahn
Pam Derks wrote: > > Hi all, Hello, > I have 2 files that contain a filename and # of hits > I've split the contents of these 2 files into %hash1 and %hash2 > I want to find out the difference in the # of hits > can someone shed some light on the approach I should take. > > I've gotten this far

RE: newbie stuck in a hash

2003-01-31 Thread Pam Derks
-Original Message- From: Pam Derks [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 3:21 PM To: [EMAIL PROTECTED] Subject: newbie stuck in a hash Hi all, I have 2 files that contain a filename and # of hits I've split the contents of these 2 files into %hash1 and %hash2 I wan

RE: newbie stuck in a hash

2003-01-31 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Pam Derks wrote: > Hi all, > > I have 2 files that contain a filename and # of hits > I've split the contents of these 2 files into %hash1 and %hash2 > > I want to find out the difference in the # of hits > > can someone shed some light on the approach I should take. > > thanks in advance, > Pa

RE: newbie stuck in a hash

2003-01-31 Thread Hanson, Rob
quot; sign print "$page $diff\n"; } It can be done a lot more compact than this, but I thought this would be a bit more understandable. Rob -Original Message- From: Pam Derks [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 3:21 PM To: [EMAIL PROTECTED] Subject: newbie

newbie stuck in a hash

2003-01-31 Thread Pam Derks
Hi all, I have 2 files that contain a filename and # of hits I've split the contents of these 2 files into %hash1 and %hash2 I want to find out the difference in the # of hits can someone shed some light on the approach I should take. thanks in advance, Pam I've gotten this far: sample data