> > --- Dan Muey <[EMAIL PROTECTED]> wrote: > > #!/usr/bin/perl -w > > use strict; > > #my $dog = 'bart'; > > eval { > > use lib '/home/dmuey'; > > require "lib.lib"; > > }; > > print "Content-type: text/html\n\n"; > > print "Error: $@ :: $dog ::\n"; > > > > :: lib.lib file is :: > > > > my $dog = 'joe'; > > 1; > > First, $dog is a my() variable, and so ONLY exists in the lib > file. Don't use my() in that circumstance.
Makes sense. Thanks! I got it going ok and it was good to know before I made a whole bunch of stuff that would've needed changing! Thanks again.! > better, try this: > > libfile: > ========= > $dog = 'spot'; > > progfile: > ========= > use warnings; > use strict; > use vars '$dog'; > do 'libfile'; Just curious...Why do, why not require ?? > print "$dog\n"; > > output: > ======== > spot > > c.f. do() in the docs. :) > > perldoc -f do > > __________________________________________________ > Do you Yahoo!? > Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]