Special_K has asked for the wisdom of the Perl Monks concerning the following question:
I am reviewing code which has the following at the top of the script:
#!/tool/bin/perl use strict; use warnings;
Then inside each subroutine it includes the same:
sub sub1 { use strict; use warnings; ... } sub sub2 { use strict; use warnings; ... } sub subN { use strict; use warnings; ... }
Is there any purpose to this seemingly redundant use of "use strict" and "use warnings" or can these statements be removed from each individual subroutine if I keep them at the top of the script?
Back to
Seekers of Perl Wisdom