my $sipPW; foreach my $key ( keys %DB_data){ if ($key =~ /PWD/){ $sipPW = $_; } } print "PWD: $sipPW\n";