You should reply to a post as opposed to updating your original post with the reply - I only saw your response by accident.

While it's not incorrect syntax, you should call your subroutines without a leading ampersand (&) - see perlsub for details.

The warnings pragma is lexically scoped. Perhaps you have it hidden in a block somewhere - you haven't shown it so there's no way to tell if you've used the correct syntax. The documentation will tell you. You haven't shown use of the strict pragma either.

You're using two @reports arrays. Is that causing you some confusion? Is that what you intended? The first one might be global but you haven't shown enough code for me to tell.

You could test the values of variables with a simple print statement to see if what you think you're passing around is actually happening.

You need to show your output. It doesn't matter if it's going to the screen, saved in a log file or reported in some other fashion - you need to include it with your problem description.

Your code would be a lot easier to read if you used indentation - see perlstyle for some pointers in this regard.

Have you read How do I post a question effectively? There's a link to this page about 5 lines under the Preview button. It's there whenever you want to post a node. Please familiarise yourself with its contents.

-- Ken


In reply to Re: Return array not passed to sub call by kcott
in thread Return array not passed to sub call by begood321

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.