Re: comparing hash values

2001-08-25 Thread Marcus Holland-Moritz
You can check if a key is already in a hash table with Perl's exists() function. Have a look at 'perldoc -f exists' for details. Hope this helps. -- Marcus - Original Message - From: "Darfler, Jim (J.E.)" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 21, 2001 8:05 PM

Re: hash key with regexp - thanks & further question

2001-08-24 Thread Marcus Holland-Moritz
> Yet further question: > > my %this = ('A' => 'valueA', 'B' => 'valueB'); > my %is = ('A' => 'othervalueA', 'B' => 'othervalueB'); > my @array = ('this', 'is'); > my $string = "this";#will actually be user input, might also be "is" > my $data = "A and B"; > foreach my $array (@array) { > if ($str