#!/fellow/monks.pl
I'm finally doing it -- I'm using strict, and it's a real change from what I'm used to ;-) Regardless, I need to use it, and so far it's going ok, except for a few minor issues. Fearless monks, I need advise.
For simplicity, here's a simulation of my problem. Enter the pie script.
The pie requires script b.pl#!/usr/bin/perl use strict; my $pie; require "b.pl"; &getpied; print "The pie says : $pie\n";
#!/usr/bin/perl use strict; sub getpied { my $pie = "eat me"; } 1;
So, without strict and the 'my' declarations, the script works fine, and the pie says 'eat me', however, when I put the strict stuff in, my variables are no longer portable between libraries.
Fearless monks, do I need to define "use strict" on every perl page, or is one on the main calling page enough? And lastly, how can I get $pie to be portable between the two scripts? Using return is not an option, as I have a whole lot of variables that has to be available in about 8 different scripts.
Thanks!
#!/massyn.pl
Don't -- me without telling me why. If you asked a stupid question, I wouldn't down vote you.
In reply to 'use strict;' between libraries by Massyn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |