Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
this is my first post on here. If I am violating any rules, I apologize in advance. Also, if you see a simple way I can improve my conventions for coding

Welcome, and no worries, for a first post it's fine :-) Some good introductory reading is PerlMonks for the Absolute Beginner, The Perl Monks Guide to the Monastery, and How do I post a question effectively?

Sorry, I can't reproduce the issue, neither with your original code with strict turned off, or with it turned on and the appropriate my declarations added (although I'm not surprised by the latter). Without seeing more code (a representative Short, Self-Contained, Correct Example), I can only guess: Either you're making a mistake somewhere in the "manipulations occur here producing a new array with 6 values", which you haven't shown us, or, since you're apparently not using strict, meaning all of those variables are global, there is some "cross-contamination" happening between the arrays (Update 2: I just wrote some more on that here). This is one reason you should always Use strict and warnings*, since it helps enforce proper scoping of your variables!

* Update: Your program should begin with this, see the Basic debugging checklist:

use strict; use warnings; use diagnostics;

In reply to Re: Leaking Function Return by haukex
in thread Leaking Function Return by cgoolsby

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the universe expands...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (4)
    As of 2018-06-19 22:25 GMT
    Find Nodes?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?

      Results (115 votes). Check out past polls.