From 92c81596c8a173fe0e4275adb5e01e8264641f46 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Wed, 17 May 2017 15:19:11 +0200 Subject: Don't use $_ unnecessarily --- acme-tinier.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acme-tinier.pl b/acme-tinier.pl index c34cce3..96424fa 100755 --- a/acme-tinier.pl +++ b/acme-tinier.pl @@ -21,11 +21,11 @@ my $acme_dir = $ENV{ACME_DIR} || die 'ACME_DIR not set'; # Prepare some values derived from account key for the ACME protocol sub b64 { encode_base64url(shift, '') =~ s/=//gr } -$_ = `openssl rsa -in '$account_key' -noout -text`; +my $key_info = `openssl rsa -in '$account_key' -noout -text`; die 'cannot process account key' if $?; my ($pub_hex, $pub_exp) = - /modulus:\n\s+00:([a-f\d:\s]+?)\npublicExponent: (\d+)/m; + $key_info =~ /modulus:\n\s+00:([a-f\d:\s]+?)\npublicExponent: (\d+)/m; $pub_exp = sprintf("%x", $pub_exp); $pub_exp = "0$pub_exp" if length($pub_exp) % 2; -- cgit v1.2.3-70-g09d2