inkubus:

Based on your nodes -- above and below -- I suspect you really, really need to read On asking for help and How do I post a question effectively?.

In fact, reading the next few sentences may illuminate your quest:

You'll get better answers here if you show that you've made some legitimate effort to solve your own problem. IOW, show us some code and explain how it fails and what error messages and warnings you see. And if you know nothing about programing, at least answer questions like Corion's -- write up a (structured) little list of the steps by which you could solve your problem with pencil and paper (for a liberal definition of "pencil and paper").

The above answer doesn't do that. But the balance of your interactions in this thread might have gone better had you answered something like this:

  1. Subtract the second number from the first; save the difference somewhere
  2. Subtract the third number from the second; save the difference...
  3. and so on... until...
  4. Subtract ZERO from the last number and save the difference (or, phrased another way, 'simply save the last number').

That's a simple-minded (and only partial) algorithm to address your request; translating that to code in any language is (just) a matter of matering the language.

And we're here to help when some aspect of the language stumps you... but we're not here to write your code.


In reply to Re^3: Perl hex substraction by ww
in thread Perl hex substraction by inkubus

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.