Should use common_pdf::pt so you do not have name collisions if pt is already defined in the main script
see http://perldoc.perl.org/Exporter.html for more info on Exporting variables from modules Roey On Thu, Sep 3, 2009 at 4:48 PM, Berler Chanan <[email protected]> wrote: > > Hi All, > > Question for you people: > I have got a 2 files like these: one if a perl module, and the other is a > script using require to include the file. > Q: why pt is not defined in Myscript.pl file, although I used the required > ? > Thanks > Chanan > > common_pdf.pm > > ======================= > use constant pt => 1; > 1; > > Myscript.pl > ======================== > require "common_pdf.pm"; > > my $lv_num = pt; > print $lv_num; > > _______________________________________________ > Perl mailing list > [email protected] > http://mail.perl.org.il/mailman/listinfo/perl _______________________________________________ Perl mailing list [email protected] http://mail.perl.org.il/mailman/listinfo/perl
