If you have a code that runs perfectly fine, do you get more speed or something else if you use "my" and, in general, write the code more strictly?
my isn't magic, it doesn't make code run faster (maybe its half of a half of a half nanosecond faster if you're doing a million variables ... maybe )
Of course I know it should be with "my" etc, I am just wondering if there is another reason behind it except writing clean code.
clean code is the reason for 8/10 of the things you should be doing
Chances what you think is code runs perfectly fine probably isn't that fine with or without my -- this is like every new programmers experience :)
Have you read all these? Tutorials: Variable Scoping in Perl: the basics,
Coping with Scoping , Mini-Tutorial: Perl's Memory Management,
Lexical scoping like a fox,
In reply to Re: Question on "my" in the variables
by Anonymous Monk
in thread Question on "my" in the variables
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |