in reply to require "shared.pl" with use strict;
In general, when you are working with multiple files, and importing variables between them, you will find that requiring files ends up getting a bit complicated as your project grows. This is due to everything sharing a common namespace, but with some variables declared in some files but not others.
The usual way this is resolved in Perl is to create modules, and then import from those modules.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: require "shared.pl" with use strict;
by 5plit_func (Beadle) on Feb 20, 2015 at 01:23 UTC |