Thank you John!!! Worked perfectly.
>>> "John W. Krahn" <[EMAIL PROTECTED]> 01/22/03 11:18PM >>>
Bill Akins wrote:
>
> Hi all,
Hello,
> I have 2 hashes, the keys are a unique field. Hashes are built like this:
>
> open (INPUTFH, <allusers.chr>) or die "Can't find allusers.chr file!\n";
> while ( $line = <INPUTFH> ) {
> #set values here here...
> }
> push ( @{ $NS{$BV_NF} }, $NS_Name, $NS_Cont, $W_Name, $V_FID, $G_P, $GWD,
>$NS_Creation, $NS_Expiration, $NS_Modified, $NS_Disabled, $GWI );
>
> I need to grab each key ($BV_NF) from the hash and compare to each key in
> second hash (%BV) and print certain values from each ($NS{value}[2], $BV{$value}[8])
> if there is a match. Any advice?
Perhaps this is what you want?
for my $key ( grep exists $BV{$_}, keys %NS ) {
print "$NS{$key}[2], $BV{$key}[8]\n";
}
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]