Pathologically Eclectic Rubbish Lister | |
PerlMonks |
my and local differencesby HaB (Sexton) |
on Nov 10, 2000 at 23:00 UTC ( [id://40993]=perlquestion: print w/replies, xml ) | Need Help?? |
HaB has asked for the wisdom of the Perl Monks concerning the following question:
Hello. So I am currently on a project to document someone else's code (ugh!), and from what I can tell, the programmer in question doesn't seem to be all that familiar with perl. I am seeing some things that definately run counter to things I was taught or have learned. So I figure I'd consult the Monks for clarification. Here's the first oddment: Is this redundant? Wouldn't my() be better suited to do this? I'm not sure why he even wants local copies of those vars, since they never change. I guess what I'm looking for is a practical explanation of the difference between my and local, and the situations in which you would prefer one over the other. I have strict in use all the time, but I have only ever used my(), so I'm not clear on the difference. -HaB hword.
Back to
Seekers of Perl Wisdom
|
|