in reply to comparing elements in 2 hashes...
That'll do it... if you want case insensitive matching you can lowercase both files first...for(keys %Hash1) { print "$_\n" if exists $Hash2{$_}; }
though you might be better off to read in the key file, and then go line by line through the main file looking up the lines in the key hash... save lots of memory, probably...
then again... hashes may not be the way to go at all... what does your data look like?
Update hrm... does look a bit like homework... but isn't it summer?
- Ant
- Some of my
best work - (1 2 3)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: comparing elements in 2 hashes...
by RMGir (Prior) on Jul 02, 2002 at 19:09 UTC | |
by suaveant (Parson) on Jul 02, 2002 at 19:13 UTC | |
by cLive ;-) (Prior) on Jul 03, 2002 at 08:49 UTC |