R
Regent
Hi, friends,
Although I read several books before posting this, I still don't know how to declare a scalar in "common.pl" and use it directly in "script.pl":
common.pl
$root = "/root";
script.pl
require "common.pl"; # this line works
print "$root"; # Global symbol "$root" requires explicit package name
PS: I habitually use the -wT switch
Regent
(e-mail address removed)
Although I read several books before posting this, I still don't know how to declare a scalar in "common.pl" and use it directly in "script.pl":
common.pl
$root = "/root";
script.pl
require "common.pl"; # this line works
print "$root"; # Global symbol "$root" requires explicit package name
PS: I habitually use the -wT switch
Regent
(e-mail address removed)