in reply to Re: variables / consts for different scripts
in thread variables / consts for different scripts
I read perldoc perlmod and from that everything in your example seems okay, except that I used Constants instead of My::Constants.
I tried perl -e 'use strict; use Constants; print $DB' and get an "Global symbol "$DB" requires explicit package name at -e line 1" :-(
I'm using perl 5.8.0
I found my mistake. Your example is perfectly right and I shouldn't use "My::Constants" in the package name when I name it "Constants" everywhere else.Thanks for your help!
|
|---|