I really appreciate your help on this this is a sample txt file with content:
Supplier1 1 Supplier2 2 Supplier3 3 Exoda Total:6 euros
i need to get from every input file that Total:6 euros ( The number 6 in this case). The logic behind it is that i need to add my daily shop expenses in a file everyday. So whenever i want to check my monthly or yearly expenses to run this subroutine and get the total expenses. So i need one number but i do something wrong i get the following output:
0 0 0 0 0 0 0 0 0 6 6 12 12 18 18 24 24 30 30 36 36 42 42 48 48 54 54 60 66 66 72 78 78 84 90 90 96 102 102 108 114 114 120 126 126 132 138 138 144 150 150 156 162 162 168 174 274
there is a confusion somewhere

In reply to Re^2: compound statement by props
in thread compound statement by props

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.