in reply to Re: Warnings not working on one machine
in thread Warnings not working on one machine
After playing around a bit more I realised that the location in the code where this is happening is in another perl file which I include by require. The included file does not have use statements. Are the use strict; and use warning; only applied to the current file, and not those included by require?me@BothMachines: perl -e'use warnings; print undef; print "done\n";' Use of uninitialized value in print at -e line 1. done me@BothMachines: cat test.pl #!/usr/bin/perl use strict; use warnings; print undef; print "done\n"; me@BothMachines: ./test.pl Use of uninitialized value in print at ./test.pl line 4. done
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Warnings not working on one machine
by questions (Initiate) on Jan 26, 2018 at 13:09 UTC | |
by poj (Abbot) on Jan 26, 2018 at 13:57 UTC | |
by hippo (Archbishop) on Jan 26, 2018 at 13:57 UTC | |
by questions (Initiate) on Jan 29, 2018 at 15:10 UTC | |
by hippo (Archbishop) on Jan 29, 2018 at 15:50 UTC |