in reply to Re^4: Spreadsheet::ParseExcel Script Fails to Parse (access) Excel Spreadsheet
in thread Spreadsheet::ParseExcel Script Fails to Parse (access) Excel Spreadsheet
To "fix" it, you do something like#!/usr/bin/perl -- use strict; use warnings; use diagnostics; my $foo = 1; {# a new scope my $bar = 2; }# end of new scope my $baz = $bar; # $bar doesn't exist in this scope __END__ Global symbol "$bar" requires explicit package name at test.pl line 12 +. Execution of test.pl aborted due to compilation errors (#1) (F) You've said "use strict vars", which indicates that all variab +les must either be lexically scoped (using "my"), declared beforehand +using "our", or explicitly qualified to say which package the global var +iable is in (using "::"). Uncaught exception from user code: Global symbol "$bar" requires explicit package name at test.pl + line 12. Execution of test.pl aborted due to compilation errors. at test.pl line 13
my $foo = 1; my $bar; {# a new scope $bar = 2; }# end of new scope my $baz = $bar;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Spreadsheet::ParseExcel Script Fails to Parse (access) Excel Spreadsheet
by finhagen (Sexton) on Sep 22, 2008 at 00:43 UTC |