With use strict; you get the following errors:
Global symbol "$db" requires explicit package name at /apps/otctest/bi
+n/report/xx.perl line 8.
Global symbol "$filename" requires explicit package name at /apps/otct
+est/bin/report/xx.perl line 11.
Global symbol "@data" requires explicit package name at /apps/otctest/
+bin/report/xx.perl line 21.
Variable "$data" is not imported at /apps/otctest/bin/report/xx.perl l
+ine 24.
Global symbol "$data" requires explicit package name at /apps/otctest/
+bin/report/xx.perl line 24.
Variable "$data" is not imported at /apps/otctest/bin/report/xx.perl l
+ine 26.
Global symbol "$data" requires explicit package name at /apps/otctest/
+bin/report/xx.perl line 26.
The simple fix is
foreach my $filename (@filenames) {
I'm not trying to be snarky; what do you think $db and @data are? (The errors are telling you to define them.) Once you do, revised: you're going to start getting errors due to the underlying logical problems in your code. |