Hi monks

I am doing a small coding for copying the sub folders to another location with some condition checks.

In that i have one small condition,

if ($total < 7)) { push (@final, @temp); $hash{$s++}= \@final; @final =(); }

In the @temp array i have some values and i will push it in another @final array if the condition satisfies. I stored the array reference in a hash for my later use.When i printed the hash key and values i didnt got any output. I found where i am going wrong, that is, I am again nullifying the array @final in the block.

As per my coding i want to nullify that array if the condition satisfies. Also i want to store the array reference in the hash. I tried using temporary array but i could not able to get the solution.

So is there anyother way to store the array reference in the hash and nullify that array later.

Thanks in advance

Prasad


In reply to array reference by prasadbabu

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.