use vars @EXPORT=qw/ &call_vars &commify &dberror $CGI $spec_vars $titlebar $rpt_no $rpt_lbl $rpt_asofdt $rpt_name $project $proj_re +f $attr_dept $attr_descr $attr_award $attr_prog $attr_projpd $attr_f +yr $attr_budgpd $attr_fund $attr_rate $attr_sub $attr_status $attr_sp +ec $attr_equip $attr_resp $attr_pi $rpt_type $from_act_tbl $from_bud_ +tbl $per_crmo $per_fytd $per_fytdadj $per_fytdbal $per_fytdbaladj $att +r_pfyr $ledger $timespan $bud_led_amt $act_led_amt $pre_led_amt $enc_led_ +amt $cell_col $cell_row $acct_sql $src_or_scen $curr_or_stat $src_lbl +$summ_col $summ_row $per_col $per_row $jrnl_col $jrnl_row $ouc_code $proj_di +splay $cell_descr $summ_descr $mycheck $rpt_id $rpt_dates $sql_asofyr $s +ql_asofmo $sql_asofdy $amt_type $led_tbl /;
Without completely understanding the rest of your code, I would bet the rent money that this code will be difficult to (a) get working and (b) maintain.

Why do you have so many variables, especially imported from what appears to be data? Are you actually using all the variables as control or summation in the rest of your program logic? If so, you should probably be modularizing your code instead of passing them back to the caller of this module as a big messy blob.

More than likely, what you should be doing instead is exporting a single subroutine that returns a hash ref containing these values, and focussing the logic on treating these values as a bundle, not broken out into 87-gazillion named Perl variables.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.


In reply to •Re: Sub call isn't returning values by merlyn
in thread Sub call isn't returning values by Lori713

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.