Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Lexical variables (those created with my) do not show up in the symbol table, and thus can't be accessed via the $Packagename::variable syntax. In this case (assuming perl 5.6.0 or later), you'll want to do:
..and in the other file.. print $CNLLog::_POST_CONVERSION;Older versions of perl will need to use the use vars pragma. See perldoc vars. Update: One should also mention the wonderful article Coping with Scoping, by MJD. See also 'our' is not 'my'. perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER' In reply to Re: How to use variables from other package?
by Chmrr
|
|