in reply to Re^8: Access a global variable from a subroutine when used as "for" iterator (updated)
in thread Access a global variable from a subroutine when used as "for" iterator

Well that's confusing. Aren't these self-contradictory?

  • main:: and other package s are namespaces not scopes ...
  • variables do not belong to namespaces
  • special variables always belong to main::

I can't reconcile these 3 statements, sorry.

Post-update: reads much better now, thanks.


🦛

  • Comment on Re^9: Access a global variable from a subroutine when used as "for" iterator

Replies are listed 'Best First'.
Re^10: Access a global variable from a subroutine when used as "for" iterator
by LanX (Saint) on Dec 22, 2023 at 10:14 UTC
    Hi

    Thanks corrected, somehow the "my" got lost

    > > my variables do not belong to namespaces

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    see Wikisyntax for the Monastery