If the other answers haven't solved your problem(s), I'll take my shot (which is the best I can do without more detail).
My guess is that you are trying to use
my (lexical) variables globally. Unfortunately, lexical variables are not technically in
any package, and their scope does not reach outside of the file they appear in (even if that file is required into another file). Therefore they will show up as undefined.
If your portion of the code is in subroutines, then I would suggest you follow
Ryszard's suggestions, and pass all the variables you need to the sub, then use the return from the sub. You can then use
my variables internally to the sub with no problem.
Otherwise, you'll probably have to use 'real' globals, defined (for example) with
use vars(). But, in my opinion, that would be a design mistake. My guess is that your code does not
use strict. Could you give us a little more detail on the current design (maybe even some code) to make it easier to give helpful recommendations?
Impossible Robot
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.