Drop the double quotes! They are not necessary (in this case) and just slow the code down. In some cases blindly enclosing variables in quotes would lead to strange looking bugs. This is Perl, not a shell script.
Jenda
Enoch was right!
Enjoy the last years of Rome.
| [reply] [Watch: Dir/Any] |
The "slow the code down" is so small as to be non-existent.
| [reply] [Watch: Dir/Any] |
I agree. It's a question of readability. It requires extra thought to process the unexpected and useless quotes.
| [reply] [Watch: Dir/Any] |
Depends. If the variable contains a short string, then the slow down will be negligible. If it contains a number and the subroutine needs to do some more computations, then you've just forced perl to convert the number to a string and back. If nothing more, it's wasteful.
Then there is yet another case. What if the variable contains a huge string? You've just made yet another copy ...
Jenda
Enoch was right!
Enjoy the last years of Rome.
| [reply] [Watch: Dir/Any] |
| [reply] [Watch: Dir/Any] |