コードを実行すると、次のエラーが発生します。
syntax error line 5, near "use Digest::MD5
sub makeKey
"
syntax error at line 8, near "}"
syntax error at line 15, near ")
}"
Execution aborted due to compilation errors.
私のスクリプト:
use lib '/home/me/Desktop/pm/MD5.pm';
use Digest::MD5
sub makeKey
{
my ($strPassword, $strRndk);
$strKey = uc(md5Hash($strPassword)) + $strRndk + "Y(02.>'H}t\":E1" + md5Hash($strKey);
return $strKey;
}
sub md5Hash
{
my ($strPassword);
$strMd5 = md5_hex($strPassword);
return substr($strMd5, 16, 16) + substr($strMd5, 0, 16);
}
makeKey('test', '1A2B3C');