--- 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.

better, try this:

libfile:
=========
$dog = 'spot';

progfile:
=========
use warnings;
use strict;
use vars '$dog';
do 'libfile';
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]

Reply via email to