Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: require "shared.pl" with use strict;by vinoth.ree (Monsignor) |
on Feb 19, 2015 at 17:45 UTC ( [id://1117246]=note: print w/replies, xml ) | Need Help?? |
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. All is well. I learn by answering your questions...
In Section
Seekers of Perl Wisdom
|
|