Hello
I need to covert a shell script into a perl and I did what I can do.
But with some reason under dos command when I run the perl I did not
get what I expect.
If I run the shell script under cygwin, it runs well.
Here is the scripts.
Shell script:
readonly privkey=$2
cat $1
echo
echo "=== SIGNATURE ==="
openssl dgst -sha1 -binary -sign $privkey $1 \
| openssl base64 | sed 's/\r//g'
Perl script:
open SIGNED, ">>$signed" or die "could not open the file! $!";
binmode SIGNED;
print SIGNED "=== SIGNATURE ===\n";
my $private_pem = "license_private_key.pem";
my $signed_license = `openssl dgst -sha1 -binary -sign $private_pem
unsigned_license.lic | openssl base64` ;
$signed_license =~ s/\r//g;
print SIGNED $signed_license;
close SIGNED;
Could somebody tell me what I missed while I translate?
TIA
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/