To add a little emphasis to pg's reply: there are a number of good reasons for providing a "cleaned up" and runable version of your code when posting a question.

1/ If other Monks can just download your sample code and run it to see the problem for themselves they are more likely to investigate something subtle.

2/ Even if you can't provide a sample that runs and demonstrates the problem, making the code as simple as you can helps both you and the Monks in focusing on the problem at hand.

3/ In the process of simplifying the code you will better appreciate the nature of problem. Indeed you may even solve your own problem.

As an asside, by writing sub confirm() you are saying explicitly that confirm does not take any parameters and that it is a contender for inlining. That may or may not have been what you were intending, but is a trap that is often sprung.

Note too that the form TYPE(0x...) is almost always a clue that you have attempted to print out a reference, rahter than the thing referred to.


Perl is Huffman encoded by design.

In reply to Re: Assigning a returned value to a hash variable by GrandFather
in thread Assigning a returned value to a hash variable by Real Perl

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.