Perl Monk, Perl Meditation | |
PerlMonks |
Re: Re: Re: 'our' scopingby Sandy (Curate) |
on Jun 02, 2004 at 14:00 UTC ( [id://359440]=note: print w/replies, xml ) | Need Help?? |
Thankyou thankyou thankyou...
You have fixed many confusions that I had. I thought that 'use vars' and 'our' were identical, and it did cause me some confusions because some of my code has a mixture of both (pre 5.6 and post 5.6). I went back and re-read the our documentation in the camel book and it is very precise, and now I understand (I think) what it is talking about. However, when I went back and re-read the use vars documentation in the camel book, I realize the source of my confusion... quote (my italics) This information had led me astray (it may be technically correct, but it confused me nonetheless).This pragma, once used to declare a global variable, is now somewhat deprecated in favor of the our modifier. The previous declaration is better accomplished using : In closing, I would be really appreciative if you would turn your post into a mini-tutorial. Thanks, Sandy
In Section
Seekers of Perl Wisdom
|
|