I want to check if parameter $PGkey
is equal to a key with the same name inside a hash table. Further, I want to do it in a format as close to this as possible:
while(<PARAdef>) {
my($PGkey, $PGval) = split /\s+=\s+/;
if($PGkey == $hash{$PGkey}) {
print PARAnew "$PGkey = $hash{$PGkey}->[$id]\n";
} else {
print PARAnew "$PGkey = $PGval\n";
}
}
Is there a simple way to do it?