I guess my main question would boil down to ::

How can I use variables that get declared in a lib file in a script that uses -w and 
use strict; ?

A more complex example of what I've tried and what I'm trying to get is here ::

On the script below, when use strict is commented out ::
Name "main::dog" used only once: possible typo at ./test.pl line 11.
Content-type: text/html

Use of uninitialized value at ./test.pl line 11.
Error:  ::HI

And this when use strict; is not commented out I get ::
Global symbol "$dog" requires explicit package name at ./test.pl line 11.
Execution of ./test.pl aborted due to compilation errors.

If I uncomment the my $dog in the script then all is well. Except the lib won't change 
th value of $dog even if I take of the 'my' in the lib.

#!/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;

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to