thank you for the response. How would you do this same thing if you didn't know what the function name was to create a hard reference, the subs exist in a separate file, and you didn't know if the function even existed? (so you have to handle the error, if it hasn't been added yet or it doesn't work correctly) Unfortunately due to my inexperience, I am forced append the file name to the beginning to make a call like.

$function_name = "request_logic::".$request_hash{Logic};

Is there better way is really my question? I am uncertain how to create the reference to this sub and keep the program from dying if it throws some strange error. The $returned_hash_ref is because the sub that gets called alters the original request and I want to make sure the alterations get compared to the original. It might be an obtuse way to do it though, let me think about it...

thank you very much for you responses.


In reply to Re^3: use strict refs unless you can't figure out the syntax by theleftsock
in thread use strict refs unless you can't figure out the syntax by theleftsock

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.