use Crypt::X509; $cer = "C:\\temp\\test.cer"; $cert = Crypt::X509->new( cert => $cer ); $subject_email = $cert->subject_email;