in reply to adding value to hash

  1. You are not telling us which modules you are using, so I have no idea what ->www_form_urlencode expects as input or even what it actually does.
  2. Does the API want the signature calculated with an empty Signature value or none at all? Which of these does your code do?
  3. Read The Fine Article: HMAC — what are the inputs HMAC requires? What is the output that it produces?
  4. Read The Fine Manual: Digest::SHA — your code is not signing the request with your key, or with any key for that matter.
  5. Read The Fine Manual: perldata and perldsc — what are you "signing" and what are you printing?
  6. use strict; — you have made a trivial error that use strict; will catch; I will not tell you what it is because Perl will tell you if you use strict;. use strict;!