Me writes:
> Sorta. To quote an excellent summary:
>
> "Topic is $_".
>
> ........
>
> > is $_ always lexical variable.
>
> Yes.
>
>
> > Or I can have $MyPackage::_ ?
>
> You can copy or alias any value.
>
so if I understand correctly ,
Every topicalizer defines a topicalizer scope in which there is
implicit declaration
my $_ ;
and then lexical $_ ( implicitely ) is bound to ( or assigned to )
whatever it should in this particular topicalizer. And from that on $_
is just another lexical variable .
Question(s) :
with no "use strict vars" any "just another variable" is taken by perl as
being global -- it is implicitly "our $just_another_var;" (???)
about any lexical veriable ( just_another_variable ) Perl have to be
explicitly informed as being such . is $_ just_another_variable in
that respect too ???
in other words , what happens if I just use $_ ( that is , without
previous declaration ) *outside any topicalizer* ?
* will it be implicitly "our $_" ( probably not , because it is
always lexical )
or * will it be implicitely "my $_" -- class/package lexical
or * will it be error to just use it without declaration
* with "use strict vars"
* with "no strict vars "
will it be an error to declare it as "our $_" ;
and to repeat the question from previous post ,
what will perl do when it see
$My_Package::_ = 1 ;
???
thanks , arcadi .