Greetings fellow perl coders

I am tring to write a package module to make my code easier but i cannot seem to return the value generated. Anyone know what I am missing? It has got to be something simple i missed

use LWP::Simple; use LWP::Simple qw( $ua get ); use LWP::UserAgent; use HTTP::Request::Common qw(POST); use Price_calc; use Price_calc qw($amastringsentback1 $amastringsentback2 @amaglobal $ +amastringsentback); Price_calc::get_ama($amastringsent); # And then some attempted trys to + get value returned by Price_calc::get_ama $amastringsentback1=$Price_calc::amastringsentback; $amastringsentback2=shift; $amastringsentback3=@amagotback[0]; print "DATA: $amastringsentback - $amastringsentback1 - @amaglobal - +$amastringsentback3 - $Price_calc::amastringsentback" ; # everything just prints as empty ---------------------------------- package Price_calc; use LWP::Simple; use LWP::Simple qw( $ua get ); use LWP::UserAgent; use HTTP::Request::Common qw(POST); use Exporter; @ISA = qw(Exporter); @EXPORT_OK = qw($amastringsentback1 $amastringsentback2 @amaglobal $am +astringsentback); sub get_ama { do stuff ## THE CODE WORKS FINE JUST WONT REUTRN VALUES. @amagotback[0]=$amastringsentback; return $amastringsentback; }

In reply to Returning the value generated in package/module problem by Monkomatic

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.