good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: use vars (expound a bit?)by ybiC (Prior) |
on Jul 17, 2000 at 04:34 UTC ( [id://22802]=note: print w/replies, xml ) | Need Help?? |
I've employed both these methods for declaring variables with use strict, but like jeffa, am unclear on the difference(s) between my and use vars.
merlyn's response is, as always, authoritative and to the point. Would a grokful Monk expound a bit, to help an amatuer Perler understand? Update: Oops - Autark explained very well the lexical vs. global aspect. That's what I get for composing a question and not posting till after finishing a good show on The History Channel. :^) Now I'm merely confused on the main:foo part. To my knowledge, I've never "fully-qualified" a variable, yet my cobbled-up scripts work anyway. At the risk of asking a dumb question - under what circumstances is it necessary to fully qualify?
In Section
Seekers of Perl Wisdom
|
|