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;!

In reply to Re: adding value to hash by jcb
in thread adding value to hash by bigup401

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.