Re: Include variables from external perl script



On Oct 30, 1:51 pm, nobul...@xxxxxxxxx (Nobul...@xxxxxxxxx) wrote:
On Oct 30, 2:50 pm, mri...@xxxxxxxxx (Paul Lalli) wrote:

If there is no strict, 'our' is a no-op.

Not entirely true. The scope of a variable declared with our is
different from one that's not needed to be declared because use strict
is not in use.

This is nonsensical. our does not "declare" a variable. It simply
allows you to use the non-fully qualified name for the duration of the
scope of 'our', regardless of use strict.

Please post a short example of what you're trying to claim.

Paul Lalli

.



Relevant Pages

  • Re: Using closures with "use strict"
    ... If I define a "use strict" and want to create a closure, ... If you intend to access the same global variable within a different scope ... advantage that you can declare it within smaller blocks as needed, ...
    (comp.lang.perl.misc)
  • Re: Pragmas use strict and use warnings
    ... global variables must be fully qualified. ... or to disable strict 'vars' on a variable-by-variable ... assert "use strict forces you to declare your variables". ... if the resulting error message was something along the ...
    (perl.beginners)
  • Re: Idiomatic Perl for GPA Calculation
    ... >strict wants you to declare the scope of the variable. ... making the easy jobs easy, ...
    (perl.beginners)
  • Re: Syntax error
    ... > You should always declare all variables as lexically scoped in the ... With regards to your advice, I am not familiar with the term ... I do "use strict" in all of my normal perl scripts. ... added both the "use strict" and "use warnings" line, ...
    (comp.lang.perl.misc)
  • Re: Recurse over a hash without knowing any elements (except top level)
    ... > I have a hash that is several levels deep. ... You forgot to declare $depth. ... "use strict" would have told you about ... By choosing not to "use strict" you instruct Perl to assume any ...
    (comp.lang.perl)