davies has asked for the wisdom of the Perl Monks concerning the following question:
our $var; *var = \$main::var;
I have recently come across the construct above, which is unfamiliar to me. "our" is reasonably clear (although I have made mistakes using it in the past so I may not know it as well as I think), but in combination with the second line, I am not sure what is going on. Could someone please point me to the relevant docs?
Regards,
John Davies
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unusual variable declaration
by choroba (Cardinal) on Nov 02, 2019 at 21:46 UTC | |
by LanX (Saint) on Nov 03, 2019 at 12:12 UTC | |
by haukex (Archbishop) on Nov 02, 2019 at 21:49 UTC | |
|
Re: Unusual variable declaration
by davido (Cardinal) on Nov 02, 2019 at 21:50 UTC | |
by Jenda (Abbot) on Nov 04, 2019 at 12:37 UTC | |
by LanX (Saint) on Nov 04, 2019 at 14:44 UTC | |
by davido (Cardinal) on Nov 04, 2019 at 19:28 UTC | |
by LanX (Saint) on Nov 04, 2019 at 22:25 UTC | |
by Jenda (Abbot) on Nov 05, 2019 at 11:19 UTC | |
| |
|
Re: Unusual variable declaration
by BillKSmith (Monsignor) on Nov 03, 2019 at 00:29 UTC | |
by Anonymous Monk on Nov 03, 2019 at 09:18 UTC |