if($p{'vcard'} =~ m/\.vcf/){
my $vcard_file = $cgi->upload('vcard');
my $vcard_list = Text::vCard::Addressbook->new({ 'source_file' => $vcard_file });
foreach my $vcard ($vcard_list->vcards()){
...
...
...
my $photo = $vcard->get({ 'node_type' => 'photo' });
my $contact_photo = $photo->[0]->value();
#decodes it with MIME::Base64
#uses Image::Magick to write it as jpg and save to directory
...
...
...
}
}