Created
May 16, 2016 18:00
-
-
Save marcioferreira/f79a68ff58392b8f16856f8ce6cb7561 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my %full_data = ( | |
'email1' => uuid4('personA'), | |
'email2' => uuid4('personA'), | |
'cpf' => uuid4('personA'), | |
'email4' => uuid4('personB'), | |
'email5' => uuid4('personC'), | |
); | |
my %new_data = ( | |
email => 'email6', | |
cpf => 'cpf', | |
); | |
my $_flag = 0; | |
for my $val (values %new_data ){ | |
$_flag = 1 if exists $full_data{$val}; | |
} | |
if ($_flag){ | |
# match | |
}else{ | |
# new | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment