actually I read it all carefully but it's complicated to interpret a page full of coding *theory* without any code *examples*...and English is actually not my best foreign language ...
>If you don't understand how "vars" works, then you should correct that, because it is really simple and occasionally useful.
well the perldoc says
but actually - as I only found out by experimenting - it depends on the scope of "package" which confused me!the "use vars" and "use subs" declarations are not BLOCK-scoped. They are thus effective for the entire file in which they appear.
to make it clearer some code:
But where's the problem to import variables with our ??? Could you give me please a code example?use strict; $\="\n"; use vars qw($x); $x="main"; { print $x; package one; use vars qw($x); $x="one"; print $x; } print $x; __END__ main one main
Cheers Rolf
In reply to Re^13: the "our" declaration ?!! (special vars)
by LanX
in thread the "our" declaration ?!!
by perlpal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |